public class DeploymentLoader
extends java.lang.Object
ZooKeeperStreamRepository
and ZooKeeperJobRepository
.ContainerListener
,
JobDeploymentListener
,
StreamDeploymentListener
Constructor and Description |
---|
DeploymentLoader() |
Modifier and Type | Method and Description |
---|---|
static Job |
loadJob(org.apache.curator.framework.CuratorFramework client,
java.lang.String jobName,
JobFactory jobFactory)
Load the
Job
instance for a given job nameif the job is deployed. |
static Stream |
loadStream(org.apache.curator.framework.CuratorFramework client,
java.lang.String streamName,
StreamFactory streamFactory)
Load the
Stream instance
for a given stream name if the stream is deployed. |
public static Job loadJob(org.apache.curator.framework.CuratorFramework client, java.lang.String jobName, JobFactory jobFactory) throws java.lang.Exception
Job
instance for a given job nameif the job is deployed.client
- curator clientjobName
- the name of the job to loadjobFactory
- job factory used to create instance of jobnull
if the job does not exist
or is not deployedjava.lang.Exception
public static Stream loadStream(org.apache.curator.framework.CuratorFramework client, java.lang.String streamName, StreamFactory streamFactory) throws java.lang.Exception
Stream
instance
for a given stream name if the stream is deployed. It will
include the stream definition as well as any deployment properties
data for the stream deployment.client
- curator clientstreamName
- the name of the stream to loadstreamFactory
- stream factory used to create instance of streamnull
if the stream does
not exist or is not deployedjava.lang.Exception
- if ZooKeeper access fails for any reason