public class DeploymentQueue
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
DeploymentMessage
s.Constructor and Description |
---|
DeploymentQueue(org.apache.curator.framework.CuratorFramework client,
org.apache.curator.framework.recipes.queue.QueueConsumer queueConsumer,
java.lang.String deploymentQueuePath,
java.util.concurrent.ExecutorService executorService)
Construct deployment queue
|
DeploymentQueue(ZooKeeperConnection zkConnection)
Construct deployment queue
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
destroy() |
org.apache.curator.framework.CuratorFramework |
getClient()
Return the Curator client.
|
org.apache.curator.framework.recipes.queue.DistributedQueue<DeploymentMessage> |
getDistributedQueue()
Get the underlying distributed queue.
|
void |
start()
Build and Start the ZK distributed queue.
|
public DeploymentQueue(ZooKeeperConnection zkConnection)
zkConnection
- the ZooKeeper connectionpublic DeploymentQueue(org.apache.curator.framework.CuratorFramework client, org.apache.curator.framework.recipes.queue.QueueConsumer queueConsumer, java.lang.String deploymentQueuePath, java.util.concurrent.ExecutorService executorService)
client
- the Curator framework clientqueueConsumer
- the consumer that consumes the deployment messagesdeploymentQueuePath
- the ZK path for the deployment queuepublic void start() throws java.lang.Exception
java.lang.Exception
public org.apache.curator.framework.recipes.queue.DistributedQueue<DeploymentMessage> getDistributedQueue()
public org.apache.curator.framework.CuratorFramework getClient()
public void destroy() throws java.lang.Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
java.lang.Exception
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception