public abstract class ZKDeploymentHandler extends java.lang.Object implements DeploymentHandler, SupervisorElectionListener
Modifier and Type | Field and Description |
---|---|
protected org.apache.curator.framework.recipes.cache.PathChildrenCache |
moduleDeploymentRequests
Cache of children under the module deployment requests path.
|
protected ZooKeeperConnection |
zkConnection
ZooKeeper connection
|
Constructor and Description |
---|
ZKDeploymentHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
createModuleDeploymentRequestsPath(org.apache.curator.framework.CuratorFramework client,
ModuleDescriptor descriptor,
RuntimeModuleDeploymentProperties deploymentProperties)
Create
ModuleDeploymentRequestsPath for the given
ModuleDescriptor and
the RuntimeModuleDeploymentProperties . |
void |
onSupervisorElected(SupervisorElectedEvent supervisorElectedEvent)
The action to perform after the admin leader is elected.
|
void |
undeploy(java.lang.String deploymentUnitName)
Un-deploy the
DeploymentUnit with the given name. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deploy
@Autowired protected ZooKeeperConnection zkConnection
protected org.apache.curator.framework.recipes.cache.PathChildrenCache moduleDeploymentRequests
protected void createModuleDeploymentRequestsPath(org.apache.curator.framework.CuratorFramework client, ModuleDescriptor descriptor, RuntimeModuleDeploymentProperties deploymentProperties)
ModuleDeploymentRequestsPath
for the given
ModuleDescriptor
and
the RuntimeModuleDeploymentProperties
.client
- the curator clientdescriptor
- the module descriptordeploymentProperties
- the runtime deployment propertiespublic final void undeploy(java.lang.String deploymentUnitName) throws java.lang.Exception
DeploymentHandler
DeploymentUnit
with the given name.undeploy
in interface DeploymentHandler
deploymentUnitName
- the deployment unit namejava.lang.Exception
public void onSupervisorElected(SupervisorElectedEvent supervisorElectedEvent)
SupervisorElectionListener
onSupervisorElected
in interface SupervisorElectionListener
supervisorElectedEvent
- the leader elected event