public class MBeanDeploymentOperation extends Object
A DeploymentOperation allows bundling multiple deployment steps into a composite operation that succeeds or fails atomically.
The DeploymentOperation is composed of a list of individual steps (
MBeanDeploymentOperationStep
). Each step may or may not install new
services into the container. If one of the steps fails, the operation makes
sure that
MBeanDeploymentOperationStep.cancelOperationStep(MBeanDeploymentOperation)
method.Modifier and Type | Class and Description |
---|---|
static class |
MBeanDeploymentOperation.MBeanDeploymentOperationBuilder |
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
attachments
a list of attachments allows to pass state from one operation to another
|
protected MBeanDeploymentOperationStep |
currentStep |
protected List<ObjectName> |
installedServices
the list of services installed by this operation.
|
protected boolean |
isRollbackOnFailure |
protected Logger |
log |
protected String |
name
the name of this composite operation
|
protected MBeanServiceContainer |
serviceContainer
the service container
|
protected List<MBeanDeploymentOperationStep> |
steps
the list of steps that make up this composite operation
|
protected List<MBeanDeploymentOperationStep> |
successfulSteps
a list of steps that completed successfully
|
Constructor and Description |
---|
MBeanDeploymentOperation(String name,
MBeanServiceContainer container,
List<MBeanDeploymentOperationStep> steps) |
Modifier and Type | Method and Description |
---|---|
void |
addAttachment(String name,
Object value) |
void |
addStep(MBeanDeploymentOperationStep step)
Add a new atomic step to the composite operation.
|
void |
execute() |
<S> S |
getAttachment(String name) |
List<ObjectName> |
getInstalledServices() |
MBeanServiceContainer |
getServiceContainer() |
protected void |
rollbackOperation() |
protected Logger log
protected final String name
protected final MBeanServiceContainer serviceContainer
protected final List<MBeanDeploymentOperationStep> steps
protected final List<MBeanDeploymentOperationStep> successfulSteps
protected List<ObjectName> installedServices
rollbackOperation()
must make sure
all these services are removed if the operation fails.protected Map<String,Object> attachments
protected boolean isRollbackOnFailure
protected MBeanDeploymentOperationStep currentStep
public MBeanDeploymentOperation(String name, MBeanServiceContainer container, List<MBeanDeploymentOperationStep> steps)
public <S> S getAttachment(String name)
public void addStep(MBeanDeploymentOperationStep step)
public MBeanServiceContainer getServiceContainer()
public void execute()
protected void rollbackOperation()
public List<ObjectName> getInstalledServices()
Copyright © 2015. All rights reserved.