All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.elasticsearch.river.mongodb.MongoConfig Maven / Gradle / Ivy

package org.elasticsearch.river.mongodb;

import java.util.List;

import com.mongodb.ServerAddress;

public class MongoConfig {

    private boolean isMongos;
    private final List shards;
    
    public MongoConfig(boolean isMongos, List shards) {
        this.isMongos = isMongos;
        this.shards = shards;
    }

    public List getShards() {
        return shards;
    }

    public boolean isMongos() {
        return isMongos;
    }

    public static class Shard {
        
        private final String name;
        private final List replicas;
        private final Timestamp latestOplogTimestamp;

        public Shard(String name, List replicas, Timestamp latestOplogTimestamp) {
            this.name = name;
            this.replicas = replicas;
            this.latestOplogTimestamp = latestOplogTimestamp;
        }

        public String getName() {
            return name;
        }
        public List getReplicas() {
            return replicas;
        }
        public Timestamp getLatestOplogTimestamp() {
            return latestOplogTimestamp;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy