public class KafkaClusterImpl extends AbstractEntity implements KafkaCluster
KafkaZookeeper
node and a group of KafkaBroker
s.Startable.RestartEffectorBody, Startable.StartEffectorBody, Startable.StopEffectorBody
BrooklynObject.TagSupport
Configurable.ConfigurationSupport
EntityInternal.FeedSupport
BrooklynObjectInternal.ConfigurationSupportInternal
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
log |
CHILD_ADDED, CHILD_REMOVED, EFFECTOR_ADDED, EFFECTOR_CHANGED, EFFECTOR_REMOVED, LOCATION_ADDED, LOCATION_REMOVED, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVED
BROKER_SPEC, CLUSTER, INITIAL_SIZE, START_TIMEOUT, ZOOKEEPER, ZOOKEEPER_SPEC
RESTART, 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, 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, onManagementStopped, refreshInheritedConfig, removeAllEnrichers, removeAllPolicies, removeAttribute, removeChild, removeEnricher, removeGroup, removeLocations, removePolicy, removeTag, requestPersist, resetProxy, setAttribute, setAttribute, setAttributeWithoutPublishing, setConfig, setConfig, setConfig, setConfig, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setDisplayName, setManagementContext, setParent, setProxy, subscribe, subscribeToChildren, subscribeToMembers, toMetadataRecord, toString, unsubscribe, unsubscribe
getCatalogItemId, getId, getTagSupport, rebind, setCatalogItemId, tags
addEnricher, 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, setParent
getCatalogItemId, getTagSupport, tags
config, setConfig
setCatalogItemId
public void init()
AbstractEntity
AbstractEntity.initEnrichers()
.init
in class AbstractEntity
public ZooKeeperNode getZooKeeper()
getZooKeeper
in interface KafkaCluster
public DynamicCluster getCluster()
getCluster
in interface KafkaCluster
public 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 Group
public boolean hasMember(Entity member)
public boolean addMember(Entity member)
public boolean removeMember(Entity member)
removeMember
in interface Group
public java.lang.Integer getCurrentSize()
getCurrentSize
in interface Group
getCurrentSize
in interface Resizable
public java.lang.Integer resize(java.lang.Integer desiredSize)
public <T extends Entity> T addMemberChild(EntitySpec<T> spec)
Group
Group.addChild(EntitySpec)
followed by Group.addMember(Entity)
addMemberChild
in interface Group
public <T extends Entity> T addMemberChild(T child)
Group
Group.addChild(Entity)
followed by Group.addMember(Entity)
addMemberChild
in interface Group