Class ZooKeeperServiceRegistry
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.impl.cloud.AbstractServiceRegistry
org.apache.camel.component.zookeeper.cloud.ZooKeeperServiceRegistry
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.cloud.ServiceRegistry,org.apache.camel.Ordered,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasCamelContext,org.apache.camel.spi.HasId,org.apache.camel.spi.IdAware,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
public class ZooKeeperServiceRegistry
extends org.apache.camel.impl.cloud.AbstractServiceRegistry
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.camel.cloud.ServiceRegistry
org.apache.camel.cloud.ServiceRegistry.Selector -
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDINGFields inherited from interface org.apache.camel.Ordered
HIGHEST, LOWEST -
Constructor Summary
ConstructorsConstructorDescriptionZooKeeperServiceRegistry(ZooKeeperServiceRegistryConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionvoidderegister(org.apache.camel.cloud.ServiceDefinition definition) protected voiddoStart()protected voiddoStop()List<org.apache.curator.framework.AuthInfo> longorg.apache.curator.framework.CuratorFrameworklonggetNodes()longintlongorg.apache.curator.RetryPolicylongbooleanbooleanvoidregister(org.apache.camel.cloud.ServiceDefinition definition) voidsetAuthInfoList(List<org.apache.curator.framework.AuthInfo> authInfoList) voidsetBasePath(String basePath) voidsetConfiguration(ZooKeeperServiceRegistryConfiguration configuration) voidsetConnectionTimeout(long connectionTimeout) voidsetConnectionTimeout(long connectionTimeout, TimeUnit connectionTimeotUnit) voidsetConnectionTimeoutUnit(TimeUnit connectionTimeoutUnit) voidsetCuratorFramework(org.apache.curator.framework.CuratorFramework curatorFramework) voidsetDeregisterServicesOnStop(boolean deregisterServicesOnStop) voidsetMaxCloseWait(long maxCloseWait) voidsetMaxCloseWaitUnit(TimeUnit maxCloseWaitUnit) voidsetNamespace(String namespace) voidvoidvoidsetOverrideServiceHost(boolean overrideServiceHost) voidsetReconnectBaseSleepTime(long reconnectBaseSleepTime) voidsetReconnectBaseSleepTime(long reconnectBaseSleepTime, TimeUnit reconnectBaseSleepTimeUnit) voidsetReconnectBaseSleepTimeUnit(TimeUnit reconnectBaseSleepTimeUnit) voidsetReconnectMaxRetries(int reconnectMaxRetries) voidsetReconnectMaxSleepTime(long reconnectMaxSleepTime) voidsetReconnectMaxSleepTime(long reconnectMaxSleepTime, TimeUnit reconnectBaseSleepTimeUnit) voidsetReconnectMaxSleepTimeUnit(TimeUnit reconnectMaxSleepTimeUnit) voidsetRetryPolicy(org.apache.curator.RetryPolicy retryPolicy) voidsetServiceHost(String serviceHost) voidsetSessionTimeout(long sessionTimeout) voidsetSessionTimeout(long sessionTimeout, TimeUnit sessionTimeoutUnit) voidsetSessionTimeoutUnit(TimeUnit sessionTimeoutUnit) Methods inherited from class org.apache.camel.impl.cloud.AbstractServiceRegistry
getAttributes, getCamelContext, getId, getOrder, setAttribute, setAttributes, setCamelContext, setId, setOrderMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.spi.IdAware
setGeneratedIdMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
ZooKeeperServiceRegistry
public ZooKeeperServiceRegistry() -
ZooKeeperServiceRegistry
-
-
Method Details
-
getConfiguration
-
setConfiguration
-
getCuratorFramework
public org.apache.curator.framework.CuratorFramework getCuratorFramework() -
setCuratorFramework
public void setCuratorFramework(org.apache.curator.framework.CuratorFramework curatorFramework) -
getNodes
-
setNodes
-
setNodes
-
getNamespace
-
setNamespace
-
getReconnectBaseSleepTime
public long getReconnectBaseSleepTime() -
setReconnectBaseSleepTime
public void setReconnectBaseSleepTime(long reconnectBaseSleepTime) -
setReconnectBaseSleepTime
public void setReconnectBaseSleepTime(long reconnectBaseSleepTime, TimeUnit reconnectBaseSleepTimeUnit) -
getReconnectBaseSleepTimeUnit
-
setReconnectBaseSleepTimeUnit
-
getReconnectMaxSleepTime
public long getReconnectMaxSleepTime() -
setReconnectMaxSleepTime
public void setReconnectMaxSleepTime(long reconnectMaxSleepTime) -
setReconnectMaxSleepTime
public void setReconnectMaxSleepTime(long reconnectMaxSleepTime, TimeUnit reconnectBaseSleepTimeUnit) -
getReconnectMaxSleepTimeUnit
-
setReconnectMaxSleepTimeUnit
-
getReconnectMaxRetries
public int getReconnectMaxRetries() -
setReconnectMaxRetries
public void setReconnectMaxRetries(int reconnectMaxRetries) -
getSessionTimeout
public long getSessionTimeout() -
setSessionTimeout
public void setSessionTimeout(long sessionTimeout) -
setSessionTimeout
-
getSessionTimeoutUnit
-
setSessionTimeoutUnit
-
getConnectionTimeout
public long getConnectionTimeout() -
setConnectionTimeout
public void setConnectionTimeout(long connectionTimeout) -
setConnectionTimeout
-
getConnectionTimeoutUnit
-
setConnectionTimeoutUnit
-
getAuthInfoList
-
setAuthInfoList
-
getMaxCloseWait
public long getMaxCloseWait() -
setMaxCloseWait
public void setMaxCloseWait(long maxCloseWait) -
getMaxCloseWaitUnit
-
setMaxCloseWaitUnit
-
getRetryPolicy
public org.apache.curator.RetryPolicy getRetryPolicy() -
setRetryPolicy
public void setRetryPolicy(org.apache.curator.RetryPolicy retryPolicy) -
getBasePath
-
setBasePath
-
isDeregisterServicesOnStop
public boolean isDeregisterServicesOnStop() -
setDeregisterServicesOnStop
public void setDeregisterServicesOnStop(boolean deregisterServicesOnStop) -
isOverrideServiceHost
public boolean isOverrideServiceHost() -
setOverrideServiceHost
public void setOverrideServiceHost(boolean overrideServiceHost) -
getServiceHost
-
setServiceHost
-
doStart
- Overrides:
doStartin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doStop
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
register
public void register(org.apache.camel.cloud.ServiceDefinition definition) -
deregister
public void deregister(org.apache.camel.cloud.ServiceDefinition definition)
-