public class KafkaClusterImpl extends AbstractEntity implements KafkaCluster
KafkaZookeeper node and a group of KafkaBrokers.AbstractEntity.BasicConfigurationSupport, AbstractEntity.BasicSensorSupportStartable.RestartEffectorBody, Startable.StartEffectorBody, Startable.StopEffectorBodyEntity.SensorSupportBrooklynObject.TagSupportConfigurable.ConfigurationSupportEntityInternal.FeedSupport, EntityInternal.SensorSupportInternalBrooklynObjectInternal.ConfigurationSupportInternal| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
log |
CHILD_ADDED, CHILD_REMOVED, EFFECTOR_ADDED, EFFECTOR_CHANGED, EFFECTOR_REMOVED, GROUP_ADDED, GROUP_REMOVED, LOCATION_ADDED, LOCATION_REMOVED, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVEDBROKER_SPEC, CLUSTER, INITIAL_SIZE, START_TIMEOUT, ZOOKEEPER, ZOOKEEPER_SPECRESTART, SERVICE_UP, START, STOP| Constructor and Description |
|---|
KafkaClusterImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addMember(Entity member)
Adds the given member, returning true if this modifies the set of members (i.e.
|
<T extends Entity> |
addMemberChild(EntitySpec<T> spec)
As
Group.addChild(EntitySpec) followed by Group.addMember(Entity) |
<T extends Entity> |
addMemberChild(T child)
As
Group.addChild(Entity) followed by Group.addMember(Entity) |
DynamicCluster |
getCluster() |
java.lang.Integer |
getCurrentSize() |
java.util.Collection<Entity> |
getMembers()
Return the entities that are members of this group.
|
ZooKeeperNode |
getZooKeeper() |
boolean |
hasMember(Entity member) |
void |
init()
Default entity initialization, just calls
AbstractEntity.initEnrichers(). |
boolean |
removeMember(Entity member)
Removes the given member, returning true if this modifies the set of members (i.e.
|
java.lang.Integer |
resize(java.lang.Integer desiredSize)
Grow or shrink this entity to the desired size.
|
void |
restart()
Restart the entity.
|
void |
start(java.util.Collection<? extends Location> locations)
Start the entity in the given collection of locations.
|
void |
stop()
Stop the entity.
|
addChild, addChild, addEnricher, addEnricher, addFeed, addGroup, addLocations, addPolicy, addPolicy, clearLocations, clearParent, config, configure, configure, configure, configure, configure, 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, hashCode, invalidateReferences, invoke, invoke, invoke, modifyAttribute, onManagementBecomingMaster, onManagementNoLongerMaster, onManagementStarted, onManagementStarting, onManagementStopped, refreshInheritedConfig, removeAllEnrichers, removeAllPolicies, removeAttribute, removeChild, removeEnricher, removeGroup, removeLocations, removePolicy, requestPersist, resetProxy, sensors, setAttribute, setAttribute, setAttributeWithoutPublishing, setConfig, setConfig, setConfig, setConfig, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setDisplayName, setManagementContext, setParent, setProxy, subscribe, subscribeToChildren, subscribeToMembers, toMetadataRecord, toString, unsubscribe, unsubscribegetCatalogItemId, getId, rebind, setCatalogItemId, tagsaddEnricher, addEnricher, addFeed, addGroup, addPolicy, addPolicy, clearParent, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getConfig, getConfigRaw, getConfigRaw, getCreationTime, getDisplayName, getEnrichers, getEntityType, getGroups, getIconUrl, getId, getLocations, getParent, getPolicies, invoke, removeChild, removeEnricher, removeGroup, removePolicy, sensors, setParentgetCatalogItemId, tagsconfig, setConfigsetCatalogItemIdpublic void init()
AbstractEntityAbstractEntity.initEnrichers().init in class AbstractEntitypublic ZooKeeperNode getZooKeeper()
getZooKeeper in interface KafkaClusterpublic DynamicCluster getCluster()
getCluster in interface KafkaClusterpublic 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.
public 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.
public void restart()
Startable
Some entities may define custom Effector implementations which support
a richer set of parameters. See the entity-specific Startable.RESTART effector declaration.
public java.util.Collection<Entity> getMembers()
getMembers in interface Grouppublic boolean hasMember(Entity member)
public boolean addMember(Entity member)
public boolean removeMember(Entity member)
removeMember in interface Grouppublic java.lang.Integer getCurrentSize()
getCurrentSize in interface GroupgetCurrentSize in interface Resizablepublic java.lang.Integer resize(java.lang.Integer desiredSize)
public <T extends Entity> T addMemberChild(EntitySpec<T> spec)
GroupGroup.addChild(EntitySpec) followed by Group.addMember(Entity)addMemberChild in interface Grouppublic <T extends Entity> T addMemberChild(T child)
GroupGroup.addChild(Entity) followed by Group.addMember(Entity)addMemberChild in interface Group