@UriParams public class ZooKeeperConfiguration extends Object implements Cloneable
ZookeeperConfiguration
encapsulates the configuration used to
interact with a ZooKeeper cluster. Most typically it is parsed from endpoint
uri but may also be configured programatically and applied to a
ZooKeeperComponent
. A copy of this component's configuration will be
injected into any ZooKeeperEndpoint
s the component creates.Constructor and Description |
---|
ZooKeeperConfiguration() |
Modifier and Type | Method and Description |
---|---|
void |
addZookeeperServer(String server) |
ZooKeeperConfiguration |
copy() |
long |
getBackoff() |
String |
getConnectString() |
String |
getCreateMode() |
String |
getPath() |
List<String> |
getServers() |
String |
getServerUrls()
The zookeeper server hosts (multiple servers can be separated by comma)
|
int |
getTimeout() |
boolean |
isCreate() |
boolean |
isListChildren() |
boolean |
isRepeat() |
boolean |
isSendEmptyMessageOnDelete() |
void |
setAwaitExistence(boolean awaitExistence)
Deprecated.
The usage of this option has no effect at all.
|
void |
setBackoff(long backoff)
The time interval to backoff for after an error before retrying.
|
void |
setCreate(boolean shouldCreate)
Should the endpoint create the node if it does not currently exist.
|
void |
setCreateMode(String createMode)
The create mode that should be used for the newly created node
|
void |
setListChildren(boolean listChildren)
Whether the children of the node should be listed
|
void |
setPath(String path)
The node in the ZooKeeper server (aka znode)
|
void |
setRepeat(boolean repeat)
Should changes to the znode be 'watched' and repeatedly processed.
|
void |
setSendEmptyMessageOnDelete(boolean sendEmptyMessageOnDelete)
Upon the delete of a znode, should an empty message be send to the consumer
|
void |
setServers(List<String> servers)
The zookeeper server hosts
|
void |
setTimeout(int timeout)
The time interval to wait on connection before timing out.
|
boolean |
shouldAwaitExistence()
Deprecated.
The usage of this option has no effect at all.
|
public void addZookeeperServer(String server)
public ZooKeeperConfiguration copy()
public String getServerUrls()
public int getTimeout()
public void setTimeout(int timeout)
public boolean isListChildren()
public void setListChildren(boolean listChildren)
public String getConnectString()
public void setPath(String path)
public String getPath()
public boolean isRepeat()
public void setRepeat(boolean repeat)
@Deprecated public boolean shouldAwaitExistence()
@Deprecated public void setAwaitExistence(boolean awaitExistence)
public long getBackoff()
public void setBackoff(long backoff)
public boolean isCreate()
public void setCreate(boolean shouldCreate)
public String getCreateMode()
public void setCreateMode(String createMode)
public boolean isSendEmptyMessageOnDelete()
public void setSendEmptyMessageOnDelete(boolean sendEmptyMessageOnDelete)
Apache Camel