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

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

There is a newer version: 0.7.0-M1
Show newest version
package brooklyn.entity.nosql.mongodb;

import brooklyn.config.ConfigKey;
import brooklyn.entity.group.DynamicCluster;
import brooklyn.entity.proxying.ImplementedBy;
import brooklyn.event.AttributeSensor;
import brooklyn.event.basic.AttributeSensorAndConfigKey;
import brooklyn.event.basic.BasicAttributeSensor;
import brooklyn.event.basic.BasicAttributeSensorAndConfigKey;
import brooklyn.event.basic.BasicConfigKey;
import brooklyn.util.flags.SetFromFlag;

import java.util.Collection;

/**
 * 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 = new BasicConfigKey( String.class, "mongodb.replicaSet.name", "Name of the MongoDB replica set", "BrooklynCluster"); AttributeSensor PRIMARY = new BasicAttributeSensor( MongoDBServer.class, "mongodb.replicaSet.primary", "The primary member of the replica set"); AttributeSensor> SECONDARIES = new BasicAttributeSensor( Collection.class, "mongodb.replicaSet.secondaries", "The secondary members of the replica set"); /** * The name of the replica set. */ String getReplicaSetName(); /** * @return The primary MongoDB server in the replica set. */ MongoDBServer getPrimary(); /** * @return The secondary servers in the replica set. */ Collection getSecondaries(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy