public class ControlledDynamicWebAppClusterImpl extends DynamicGroupImpl implements ControlledDynamicWebAppCluster
ElasticJavaWebAppService.ElasticJavaWebAppServiceAwareLocation, ElasticJavaWebAppService.Factory
JavaWebAppService.CanDeployAndUndeploy, JavaWebAppService.CanRedeployAll
WebAppServiceMetrics.Initializer
Startable.RestartEffectorBody, Startable.StartEffectorBody, Startable.StopEffectorBody
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
CLUSTER, CONTROLLER, CONTROLLER_SPEC, FACTORY, HOSTNAME, INITIAL_SIZE, MEMBER_SPEC, SERVICE_STATE_ACTUAL, WEB_CLUSTER_SPEC
ENTITY_FILTER, RESCAN_EFFECTOR, RUNNING
FIRST, FIRST_MEMBER, GROUP_MEMBERS, MEMBER_DELEGATE_CHILDREN, MEMBER_DELEGATE_NAME_FORMAT, RUNNING_QUORUM_CHECK, UP_QUORUM_CHECK
GROUP_SIZE, MEMBER_ADDED, MEMBER_REMOVED
REPLACE_MEMBER
NAMED_WARS, ROOT_WAR, WARS_BY_CONTEXT
ENABLED_PROTOCOLS, HTTP_PORT, HTTPS_PORT, HTTPS_SSL_CONFIG, ROOT_URL
BYTES_RECEIVED, BYTES_SENT, ERROR_COUNT, MAX_PROCESSING_TIME, PROCESSING_TIME_FRACTION_IN_WINDOW, PROCESSING_TIME_FRACTION_LAST, REQUEST_COUNT, REQUESTS_PER_SECOND_IN_WINDOW, REQUESTS_PER_SECOND_LAST, TOTAL_PROCESSING_TIME
CHECK_JAVA_HOSTNAME_BUG, JAVA_OPTS, JAVA_SYSPROPS, JAVA_VERSION_REQUIRED
RESTART, SERVICE_UP, START, STOP
DEPLOY, DEPLOYED_WARS, UNDEPLOY
REDEPLOY_ALL
Constructor and Description |
---|
ControlledDynamicWebAppClusterImpl() |
ControlledDynamicWebAppClusterImpl(Entity parent) |
ControlledDynamicWebAppClusterImpl(java.util.Map<?,?> flags) |
ControlledDynamicWebAppClusterImpl(java.util.Map<?,?> flags,
Entity parent)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
deploy(java.lang.String url,
java.lang.String targetName)
Deploys the given artifact, from a source URL, to a given deployment filename/context.
|
DynamicWebAppCluster |
getCluster() |
LoadBalancer |
getController() |
java.lang.Integer |
getCurrentSize() |
ConfigurableEntityFactory<WebAppService> |
getFactory() |
void |
init()
Default entity initialization, just calls
AbstractEntity.initEnrichers() . |
void |
rebind()
Called by framework on rebind (in new-style instances):
after configuring, but
before the instance is managed, and
before adjuncts are attached to entities, and
before a reference to an object is shared.
|
void |
redeployAll() |
java.lang.String |
replaceMember(java.lang.String memberId)
Replaces the entity with the given ID, if it is a member.
|
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()
Stops this group.
|
void |
undeploy(java.lang.String targetName)
For the DEPLOYED_WARS to be updated, the input must match the result of the call to deploy,
e.g.
|
addSubscription, addSubscription, entityFilter, onManagementBecomingMaster, onManagementNoLongerMaster, rescanEntities, setEntityFilter, setEntityFilter
addMember, addMemberChild, addMemberChild, addMemberInternal, getMembers, hasMember, removeMember, setManagementContext, setMembers, setMembers
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, 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, setParent, setProxy, subscribe, subscribeToChildren, subscribeToMembers, toMetadataRecord, toString, unsubscribe, unsubscribe
getCatalogItemId, getId, getTagSupport, setCatalogItemId, tags
addSubscription, addSubscription, entityFilter, rescanEntities, setEntityFilter, setEntityFilter
setMembers, setMembers
addChild, addChild, addMember, addMemberChild, addMemberChild, getMembers, hasMember, removeMember
setCatalogItemId
public ControlledDynamicWebAppClusterImpl()
public ControlledDynamicWebAppClusterImpl(java.util.Map<?,?> flags)
public ControlledDynamicWebAppClusterImpl(Entity parent)
@Deprecated public ControlledDynamicWebAppClusterImpl(java.util.Map<?,?> flags, Entity parent)
public void init()
AbstractEntity
AbstractEntity.initEnrichers()
.init
in class DynamicGroupImpl
public void rebind()
AbstractBrooklynObject
AbstractBrooklynObject.init()
will not be called on rebind.
If you need to intercept behaviour after adjuncts are attached,
consider AbstractEntity.onManagementStarting()
(but probably worth raising a discussion on the mailing list!)
rebind
in class AbstractBrooklynObject
public LoadBalancer getController()
getController
in interface ControlledDynamicWebAppCluster
public ConfigurableEntityFactory<WebAppService> getFactory()
getFactory
in interface ControlledDynamicWebAppCluster
public DynamicWebAppCluster getCluster()
getCluster
in interface ControlledDynamicWebAppCluster
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()
DynamicGroup
Does not stop any of its members. De-activates the filter and unsubscribes to entity-updates, so the membership of the group will not change.
stop
in interface DynamicGroup
stop
in interface Startable
stop
in class DynamicGroupImpl
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.lang.Integer resize(java.lang.Integer desiredSize)
Resizable
public java.lang.String replaceMember(java.lang.String memberId)
MemberReplaceable
First adds a new member, then removes this one.
replaceMember
in interface MemberReplaceable
memberId
- entity id of a member to be replacedpublic java.lang.Integer getCurrentSize()
getCurrentSize
in interface Group
getCurrentSize
in interface Resizable
getCurrentSize
in class AbstractGroupImpl
public void deploy(java.lang.String url, java.lang.String targetName)
JavaWebAppService.CanDeployAndUndeploy
either ROOT.WAR or / denotes root context
anything of form FOO.?AR (ending .?AR) is copied with that name (unless copying not necessary) and is expected to be served from /FOO
anything of form /FOO (with leading slash) is expected to be served from /FOO (and is copied as FOO.WAR)
anything of form FOO (without a dot) is expected to be served from /FOO (and is copied as FOO.WAR)
otherwise please note behaviour may vary on different appservers; e.g. FOO.FOO would probably be ignored on appservers which expect a file copied across (usually), but served as /FOO.FOO on systems that take a deployment context.
See FileNameToContextMappingTest
for definitive examples!
deploy
in interface JavaWebAppService.CanDeployAndUndeploy
url
- where to get the war, as a URL, either classpath://xxx or file:///home/xxx or http(s)...targetName
- where to tell the server to serve the WAR, see abovepublic void undeploy(java.lang.String targetName)
JavaWebAppService.CanDeployAndUndeploy
undeploy
in interface JavaWebAppService.CanDeployAndUndeploy
public void redeployAll()
redeployAll
in interface JavaWebAppService.CanRedeployAll