Class ZooKeeperConfiguration
java.lang.Object
org.apache.camel.component.zookeeper.ZooKeeperConfiguration
- All Implemented Interfaces:
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
ZooKeeperEndpoints the component creates.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddZookeeperServer(String server) copy()longgetPath()The zookeeper server hosts (multiple servers can be separated by comma)intbooleanisCreate()booleanbooleanisRepeat()booleanvoidsetBackoff(long backoff) The time interval to backoff for after an error before retrying.voidsetCreate(boolean shouldCreate) Should the endpoint create the node if it does not currently exist.voidsetCreateMode(String createMode) The create mode that should be used for the newly created nodevoidsetListChildren(boolean listChildren) Whether the children of the node should be listedvoidThe node in the ZooKeeper server (aka znode)voidsetRepeat(boolean repeat) Should changes to the znode be 'watched' and repeatedly processed.voidsetSendEmptyMessageOnDelete(boolean sendEmptyMessageOnDelete) Upon the delete of a znode, should an empty message be send to the consumervoidsetServers(List<String> servers) The zookeeper server hostsvoidsetTimeout(int timeout) The time interval to wait on connection before timing out.
-
Constructor Details
-
ZooKeeperConfiguration
public ZooKeeperConfiguration()
-
-
Method Details
-
addZookeeperServer
-
copy
-
getServers
-
getServerUrls
The zookeeper server hosts (multiple servers can be separated by comma) -
setServers
The zookeeper server hosts -
getTimeout
public int getTimeout() -
setTimeout
public void setTimeout(int timeout) The time interval to wait on connection before timing out. -
isListChildren
public boolean isListChildren() -
setListChildren
public void setListChildren(boolean listChildren) Whether the children of the node should be listed -
getConnectString
-
setPath
The node in the ZooKeeper server (aka znode) -
getPath
-
isRepeat
public boolean isRepeat() -
setRepeat
public void setRepeat(boolean repeat) Should changes to the znode be 'watched' and repeatedly processed. -
getBackoff
public long getBackoff() -
setBackoff
public void setBackoff(long backoff) The time interval to backoff for after an error before retrying. -
isCreate
public boolean isCreate() -
setCreate
public void setCreate(boolean shouldCreate) Should the endpoint create the node if it does not currently exist. -
getCreateMode
-
setCreateMode
The create mode that should be used for the newly created node -
isSendEmptyMessageOnDelete
public boolean isSendEmptyMessageOnDelete() -
setSendEmptyMessageOnDelete
public void setSendEmptyMessageOnDelete(boolean sendEmptyMessageOnDelete) Upon the delete of a znode, should an empty message be send to the consumer
-