Class CuratorFrameworkFactory


  • public class CuratorFrameworkFactory
    extends java.lang.Object
    Factory methods for creating framework-style clients
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static CuratorFrameworkFactory.Builder builder()
      Return a new builder that builds a CuratorFramework
      static byte[] getLocalAddress()
      Return the local address as bytes that can be used as a node payload
      static CuratorFramework newClient​(java.lang.String connectString, int sessionTimeoutMs, int connectionTimeoutMs, org.apache.curator.RetryPolicy retryPolicy)
      Create a new client
      static CuratorFramework newClient​(java.lang.String connectString, org.apache.curator.RetryPolicy retryPolicy)
      Create a new client with default session timeout and default connection timeout
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • newClient

        public static CuratorFramework newClient​(java.lang.String connectString,
                                                 org.apache.curator.RetryPolicy retryPolicy)
        Create a new client with default session timeout and default connection timeout
        Parameters:
        connectString - list of servers to connect to
        retryPolicy - retry policy to use
        Returns:
        client
      • newClient

        public static CuratorFramework newClient​(java.lang.String connectString,
                                                 int sessionTimeoutMs,
                                                 int connectionTimeoutMs,
                                                 org.apache.curator.RetryPolicy retryPolicy)
        Create a new client
        Parameters:
        connectString - list of servers to connect to
        sessionTimeoutMs - session timeout
        connectionTimeoutMs - connection timeout
        retryPolicy - retry policy to use
        Returns:
        client
      • getLocalAddress

        public static byte[] getLocalAddress()
        Return the local address as bytes that can be used as a node payload
        Returns:
        local address bytes