public class CuratorFrameworkFactoryBean
extends java.lang.Object
implements org.springframework.beans.factory.FactoryBean<org.apache.curator.framework.CuratorFramework>, org.springframework.context.SmartLifecycle
CuratorFramework and implementing SmartLifecycle.| Constructor and Description |
|---|
CuratorFrameworkFactoryBean(java.lang.String connectionString)
Construct an instance using the supplied connection string and using a default
retry policy
new ExponentialBackoffRetry(1000, 3). |
CuratorFrameworkFactoryBean(java.lang.String connectionString,
org.apache.curator.RetryPolicy retryPolicy)
Construct an instance using the supplied connection string and retry policy.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.curator.framework.CuratorFramework |
getObject() |
java.lang.Class<?> |
getObjectType() |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
boolean |
isSingleton() |
void |
setAutoStartup(boolean autoStartup) |
void |
setPhase(int phase) |
void |
start() |
void |
stop() |
void |
stop(java.lang.Runnable runnable) |
public CuratorFrameworkFactoryBean(java.lang.String connectionString)
new ExponentialBackoffRetry(1000, 3).connectionString - list of servers to connect topublic CuratorFrameworkFactoryBean(java.lang.String connectionString,
org.apache.curator.RetryPolicy retryPolicy)
connectionString - list of servers to connect toretryPolicy - the retry policypublic int getPhase()
getPhase in interface org.springframework.context.PhasedgetPhase in interface org.springframework.context.SmartLifecyclepublic void setPhase(int phase)
phase - the phaseSmartLifecyclepublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecyclepublic void setAutoStartup(boolean autoStartup)
autoStartup - true to automatically startSmartLifecyclepublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic void stop(java.lang.Runnable runnable)
stop in interface org.springframework.context.SmartLifecyclepublic org.apache.curator.framework.CuratorFramework getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<org.apache.curator.framework.CuratorFramework>public java.lang.Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<org.apache.curator.framework.CuratorFramework>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<org.apache.curator.framework.CuratorFramework>