public class MongoDBReplicaSetImpl extends DynamicClusterImpl implements MongoDBReplicaSet
MongoDBReplicaSet.
Replica sets have a minimum of three members.
Removal strategy is always NON_PRIMARY_REMOVAL_STRATEGY.| Modifier and Type | Class and Description |
|---|---|
static class |
MongoDBReplicaSetImpl.MemberTrackingPolicy |
DynamicCluster.NodePlacementStrategy, DynamicCluster.ZoneFailureDetectorBrooklynObject.TagSupportConfigurable.ConfigurationSupportStartable.RestartEffectorBody, Startable.StartEffectorBody, Startable.StopEffectorBodyEntityInternal.FeedSupportBrooklynObjectInternal.ConfigurationSupportInternalCHILD_ADDED, CHILD_REMOVED, EFFECTOR_ADDED, EFFECTOR_CHANGED, EFFECTOR_REMOVED, LOCATION_ADDED, LOCATION_REMOVED, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVEDINITIAL_SIZE, PRIMARY_ENTITY, REPLICA_SET_ENDPOINTS, REPLICA_SET_NAMEAVAILABILITY_ZONE_NAMES, CLUSTER, CLUSTER_MEMBER, CUSTOM_CHILD_FLAGS, ENABLE_AVAILABILITY_ZONES, ENTITY_QUARANTINED, FACTORY, FAILED_SUB_LOCATIONS, FIRST_MEMBER_SPEC, INITIAL_QUORUM_SIZE, MEMBER_SPEC, NUM_AVAILABILITY_ZONES, QUARANTINE_FAILED_ENTITIES, QUARANTINE_GROUP, REMOVAL_STRATEGY, RESIZE_BY_DELTA, SERVICE_STATE_ACTUAL, SUB_LOCATIONS, ZONE_FAILURE_DETECTOR, ZONE_PLACEMENT_STRATEGYFIRST, FIRST_MEMBER, GROUP_MEMBERS, MEMBER_DELEGATE_CHILDREN, MEMBER_DELEGATE_NAME_FORMAT, RUNNING_QUORUM_CHECK, UP_QUORUM_CHECKGROUP_SIZE, MEMBER_ADDED, MEMBER_REMOVEDRESTART, SERVICE_UP, START, STOPREPLACE_MEMBER| Constructor and Description |
|---|
MongoDBReplicaSetImpl() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getName()
The name of the replica set.
|
MongoDBServer |
getPrimary() |
com.google.common.base.Function<java.util.Collection<Entity>,Entity> |
getRemovalStrategy() |
java.util.Collection<MongoDBServer> |
getReplicas() |
java.util.Collection<MongoDBServer> |
getSecondaries() |
void |
onManagementStopped()
Invoked by
EntityManagementSupport when this entity is fully unmanaged. |
void |
start(java.util.Collection<? extends Location> locations)
Start the entity in the given collection of locations.
|
void |
stop()
Stop the entity.
|
addNode, init, removeChild, replaceMember, resize, resizeByDelta, restart, setFactory, setMemberSpec, setRemovalStrategy, setZoneFailureDetector, setZonePlacementStrategyaddMember, addMemberChild, addMemberChild, addMemberInternal, getCurrentSize, getMembers, hasMember, removeMember, setManagementContext, setMembers, setMembersaddChild, addChild, addEnricher, addEnricher, addFeed, addGroup, addLocations, addPolicy, addPolicy, addTag, clearLocations, clearParent, config, configure, configure, configure, configure, configure, containsTag, destroy, emit, emitInternal, equals, feeds, firstLocation, getAllAttributes, getAllConfig, getAllConfigBag, getApplication, getApplicationId, getAttribute, getAttributeByNameParts, getChildren, getConfig, getConfig, getConfig, getConfig, getConfigMap, getConfigRaw, getConfigRaw, getCreationTime, getDisplayName, getEffector, getEnrichers, getEntityType, getExecutionContext, getFeedSupport, getGroups, getIconUrl, getLocalConfigBag, getLocations, getManagementContext, getManagementSupport, getMutableEntityType, getParent, getPolicies, getProxy, getProxyIfAvailable, getRebindSupport, getSubscriptionContext, getTags, hashCode, invalidateReferences, invoke, invoke, invoke, modifyAttribute, onManagementBecomingMaster, onManagementNoLongerMaster, onManagementStarted, onManagementStarting, refreshInheritedConfig, removeAllEnrichers, removeAllPolicies, removeAttribute, removeEnricher, removeGroup, removeLocations, removePolicy, removeTag, requestPersist, resetProxy, setAttribute, setAttribute, setAttributeWithoutPublishing, setConfig, setConfig, setConfig, setConfig, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setDisplayName, setParent, setProxy, subscribe, subscribeToChildren, subscribeToMembers, toMetadataRecord, toString, unsubscribe, unsubscribegetCatalogItemId, getId, getTagSupport, rebind, setCatalogItemId, tagsaddNode, resizeByDelta, setFactory, setMemberSpec, setRemovalStrategy, setZoneFailureDetector, setZonePlacementStrategysetMembers, setMembersaddChild, addChild, addMember, addMemberChild, addMemberChild, getCurrentSize, getMembers, hasMember, removeMemberaddEnricher, addEnricher, addFeed, addGroup, addPolicy, addPolicy, addTag, clearParent, containsTag, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getConfig, getConfigRaw, getConfigRaw, getCreationTime, getDisplayName, getEnrichers, getEntityType, getGroups, getIconUrl, getId, getLocations, getParent, getPolicies, getTags, invoke, removeChild, removeEnricher, removeGroup, removePolicy, removeTag, setParentgetCatalogItemId, getTagSupport, tagsconfig, setConfiggetCurrentSize, resizereplaceMembersetCatalogItemIdpublic com.google.common.base.Function<java.util.Collection<Entity>,Entity> getRemovalStrategy()
NON_PRIMARY_REMOVAL_STRATEGYpublic java.lang.String getName()
MongoDBReplicaSetgetName in interface MongoDBReplicaSetpublic MongoDBServer getPrimary()
getPrimary in interface MongoDBReplicaSetpublic java.util.Collection<MongoDBServer> getSecondaries()
getSecondaries in interface MongoDBReplicaSetpublic java.util.Collection<MongoDBServer> getReplicas()
getReplicas in interface MongoDBReplicaSetpublic void start(java.util.Collection<? extends Location> locations)
Startable
Some entities may define custom Effector implementations which support
a richer set of parameters. See the entity-specific Startable.START effector declaration.
start in interface Startablestart in class DynamicClusterImplpublic void stop()
Startable
Some entities may define custom Effector implementations which support
a richer set of parameters. See the entity-specific Startable.STOP effector declaration.
stop in interface Startablestop in class DynamicClusterImplpublic void onManagementStopped()
AbstractEntityEntityManagementSupport when this entity is fully unmanaged.
Note that the activies possible here (when unmanaged) are limited, and that this event may be caused by either a brooklyn node itself being demoted (so the entity is managed elsewhere) or by a controlled shutdown.
onManagementStopped in class AbstractEntity