Class ZooKeeperConfiguration
- java.lang.Object
-
- org.apache.camel.component.zookeeper.ZooKeeperConfiguration
-
- All Implemented Interfaces:
Cloneable
@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 aZooKeeperComponent
. A copy of this component's configuration will be injected into anyZooKeeperEndpoint
s the component creates.
-
-
Constructor Summary
Constructors Constructor Description ZooKeeperConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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
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 nodevoid
setListChildren(boolean listChildren)
Whether the children of the node should be listedvoid
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 consumervoid
setServers(List<String> servers)
The zookeeper server hostsvoid
setTimeout(int timeout)
The time interval to wait on connection before timing out.
-
-
-
Method Detail
-
addZookeeperServer
public void addZookeeperServer(String server)
-
copy
public ZooKeeperConfiguration copy()
-
getServerUrls
public String getServerUrls()
The zookeeper server hosts (multiple servers can be separated by comma)
-
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
public String getConnectString()
-
setPath
public void setPath(String path)
The node in the ZooKeeper server (aka znode)
-
getPath
public String 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
public String getCreateMode()
-
setCreateMode
public void setCreateMode(String createMode)
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
-
-