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;
}
}
}