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

brooklyn.entity.nosql.mongodb.MongoDBReplicaSet Maven / Gradle / Ivy

The newest version!
package brooklyn.entity.nosql.mongodb;

import java.util.Collection;
import java.util.List;

import brooklyn.config.ConfigKey;
import brooklyn.entity.basic.ConfigKeys;
import brooklyn.entity.group.DynamicCluster;
import brooklyn.entity.proxying.ImplementedBy;
import brooklyn.event.AttributeSensor;
import brooklyn.event.basic.Sensors;
import brooklyn.util.flags.SetFromFlag;

import com.google.common.reflect.TypeToken;

/**
 * A replica set of {@link MongoDBServer}s, based on {@link DynamicCluster} which can be resized by a policy
 * if required.
 *
 * 

Note * An issue with mongod on Mac OS X can cause unpredictable failure of servers at start-up. * See this mailing list post * for more information. * *

This replica set implementation has been tested on OS X 10.6 and Ubuntu 12.04. * * @see http://docs.mongodb.org/manual/replication/ */ @ImplementedBy(MongoDBReplicaSetImpl.class) public interface MongoDBReplicaSet extends DynamicCluster { @SetFromFlag("replicaSetName") ConfigKey REPLICA_SET_NAME = ConfigKeys.newStringConfigKey( "mongodb.replicaSet.name", "Name of the MongoDB replica set", "BrooklynCluster"); AttributeSensor PRIMARY_ENTITY = Sensors.newSensor( MongoDBServer.class, "mongodb.replicaSet.primary.entity", "The entity acting as primary"); @SuppressWarnings("serial") AttributeSensor> REPLICA_SET_ENDPOINTS = Sensors.newSensor(new TypeToken>() {}, "mongodb.replicaSet.endpoints", "Endpoints active for this replica set"); /** * The name of the replica set. */ String getName(); /** * @return The primary MongoDB server in the replica set. */ MongoDBServer getPrimary(); /** * @return The secondary servers in the replica set. */ Collection getSecondaries(); /** * @return All servers in the replica set. */ Collection getReplicas(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy