Brooklyn

brooklyn.entity.nosql.cassandra
[Java] Class CassandraFabricImpl

java.lang.Object
  brooklyn.entity.basic.AbstractEntity
      brooklyn.entity.basic.AbstractGroupImpl
          brooklyn.entity.group.DynamicFabricImpl
              brooklyn.entity.nosql.cassandra.CassandraFabricImpl
All Implemented Interfaces:
CassandraFabric

public class CassandraFabricImpl
extends DynamicFabricImpl

Implementation of CassandraCluster.

Serveral subtleties to note: - a node may take some time after it is running and serving JMX to actually be contactable on its thrift port (so we wait for thrift port to be contactable) - sometimes new nodes take a while to peer, and/or take a while to get a consistent schema (each up to 1m; often very close to the 1m)


Field Summary
 
Fields inherited from class AbstractEntity
EFFECTOR_ADDED, EFFECTOR_CHANGED, EFFECTOR_REMOVED, LOG, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVED, _subscriptionTracker, managementSupport, tempWorkings
 
Constructor Summary
CassandraFabricImpl()

 
Method Summary
protected Multimap calculateDatacenterUsage()

protected boolean calculateServiceUp()

protected void connectEnrichers()

protected void connectSensors()

protected void disconnectSensors()

protected EntitySpec getMemberSpec()

Sets the default MEMBER_SPEC to describe the Cassandra sub-clusters.

protected int getQuorumSize(java.util.Collection members)

protected Supplier getSeedSupplier()

Prefers one node per location, and then others from anywhere.

void init()

void start(java.util.Collection locations)

void stop()

void update()

 
Methods inherited from class DynamicFabricImpl
addCluster, createCluster, getCustomChildFlags, getDisplayNamePrefix, getDisplayNameSuffix, getFabricSize, getFactory, getMemberSpec, init, removeChild, restart, setFactory, setMemberSpec, start, stop, waitForTasksOnStart
 
Methods inherited from class AbstractGroupImpl
addMember, getCurrentSize, getMembers, hasMember, init, removeMember, setManagementContext, setMembers, setMembers
 
Methods inherited from class AbstractEntity
addChild, addChild, addEnricher, addGroup, addLocations, addPolicy, clearLocations, clearParent, configure, configure, configure, configure, configure, configure, destroy, emit, emitInternal, equals, finalize, firstLocation, getAllAttributes, getAllConfig, getApplication, getApplicationId, getAttribute, getAttributeByNameParts, getChildren, getConfig, getConfig, getConfig, getConfig, getConfigMap, getCreationTime, getDisplayName, getEffector, getEnrichers, getEntityManager, getEntityType, getEntityTypeName, getExecutionContext, getGroups, getIconUrl, getId, getLocations, getManagementContext, getManagementSupport, getMutableEntityType, getParent, getPolicies, getProxy, getProxyIfAvailable, getRebindSupport, getSubscriptionContext, getSubscriptionTracker, hashCode, init, invalidateReferences, invoke, invoke, invoke, isLegacyConstruction, onManagementBecomingMaster, onManagementNoLongerMaster, onManagementStarted, onManagementStarting, onManagementStopped, refreshInheritedConfig, removeAllEnrichers, removeAllPolicies, removeAttribute, removeChild, removeEnricher, removeLocations, removePolicy, setApplication, setAttribute, setAttribute, setAttributeWithoutPublishing, setConfig, setConfig, setConfig, setConfig, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setConfigIfValNonNull, setConfigIfValNonNull, setDisplayName, setManagementContext, setParent, setProxy, subscribe, subscribeToChildren, subscribeToMembers, toMetadataRecord, toString, toStringHelper, unsubscribe, unsubscribe
 

Constructor Detail

CassandraFabricImpl

public CassandraFabricImpl()


 
Method Detail

calculateDatacenterUsage

protected Multimap calculateDatacenterUsage()


calculateServiceUp

protected boolean calculateServiceUp()


connectEnrichers

protected void connectEnrichers()


connectSensors

protected void connectSensors()


disconnectSensors

protected void disconnectSensors()


getMemberSpec

.configure(CassandraCluster.SEED_SUPPLIER, getSeedSupplier());
protected EntitySpec getMemberSpec()
Sets the default MEMBER_SPEC to describe the Cassandra sub-clusters.


getQuorumSize

protected int getQuorumSize(java.util.Collection members)


getSeedSupplier

protected Supplier getSeedSupplier()
Prefers one node per location, and then others from anywhere. Then trims result down to the "quorumSize".


init

if (log.isDebugEnabled()) log.debug("Location {} updated in Cluster {}", member, this);
public void init()


start

}
public void start(java.util.Collection locations)


stop

}
public void stop()


update

public void update()


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.