Class 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 a ZooKeeperComponent. A copy of this component's configuration will be injected into any ZooKeeperEndpoints the component creates.
    • Constructor Detail

      • ZooKeeperConfiguration

        public ZooKeeperConfiguration()
    • Method Detail

      • addZookeeperServer

        public void addZookeeperServer​(String server)
      • getServerUrls

        public String getServerUrls()
        The zookeeper server hosts (multiple servers can be separated by comma)
      • setServers

        public void setServers​(List<String> servers)
        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

        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