com.twitter.finagle.exp.zookeeper.client

ZkClient

trait ZkClient extends Closable with ClientManager

Linear Supertypes
ClientManager, ReadOnlyManager, AutoLinkManager, Closable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ZkClient
  2. ClientManager
  3. ReadOnlyManager
  4. AutoLinkManager
  5. Closable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type ConnectResponseBehaviour = (ConnectResponse) ⇒ Future[Unit]

    Definition Classes
    ClientManager

Abstract Value Members

  1. abstract val autoReconnect: Boolean

  2. abstract val autoWatchReset: Boolean

  3. abstract val canReadOnly: Boolean

  4. abstract val chroot: String

  5. abstract val dest: String

  6. abstract val label: Option[String]

  7. abstract val maxConsecutiveRetries: Int

  8. abstract val maxReconnectAttempts: Int

  9. abstract val sessionTimeout: Duration

  10. abstract val timeBetweenAttempts: Duration

  11. abstract val timeBetweenLinkCheck: Option[Duration]

  12. abstract val timeBetweenPrevSrch: Option[Duration]

  13. abstract val timeBetweenRwSrch: Option[Duration]

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def addAuth(auth: Auth): Future[Unit]

    Add the specified Auth(scheme:data) information to this connection.

    Add the specified Auth(scheme:data) information to this connection.

    auth

    an Auth

    returns

    Future[Unit] or Exception

  7. def addHosts(hostList: String): Unit

    Should add some new servers to the host list

    Should add some new servers to the host list

    hostList

    hosts to add

    Definition Classes
    ClientManager
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. var authInfo: Set[Auth]

    Attributes
    protected[this]
  10. def changeHost(host: Option[String] = None): Future[Unit]

    Should try to connect to a new host if possible.

    Should try to connect to a new host if possible. This operation will interrupt request sending until a new connection and a new session are established

    host

    the server to connect to

    returns

    Future.Done or Exception

    Definition Classes
    ClientManager
  11. def checkWatcher(watcher: Watcher): Future[Unit]

    Checks if a watcher event is still not triggered.

    Checks if a watcher event is still not triggered.

    watcher

    a watcher to test

    returns

    Future[Unit] if the watcher is ok, or else ZooKeeperException

  12. def checkWatches(path: String, watcherType: Int): Future[Unit]

    Checks if the watches on a znode for this watcher type are not triggered on the server side.

    Checks if the watches on a znode for this watcher type are not triggered on the server side.

    path

    the path to the znode

    watcherType

    the watcher type (children, data, any)

    returns

    Future[Unit] if the watches are ok, or else ZooKeeperException

    Since

    3.5.0

  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def close(deadline: Time): Future[Unit]

    Stops background jobs and closes the connection.

    Stops background jobs and closes the connection. Should be used after closing the session.

    deadline

    a deadline for closing

    returns

    Future[Unit] or Exception

    Definition Classes
    ZkClient → Closable
  15. def close(after: Duration): Future[Unit]

    Definition Classes
    Closable
  16. final def close(): Future[Unit]

    Definition Classes
    Closable
  17. def closeService(): Future[Unit]

    Stops background jobs and closes the connection.

    Stops background jobs and closes the connection. Should be used after closing the session.

    returns

    Future[Unit] or Exception

  18. def closeSession(): Future[Unit]

    Closes the session and stops background jobs.

    Closes the session and stops background jobs.

    returns

    Future[Unit] or Exception

  19. def connect(host: Option[String] = None): Future[Unit]

    Connects to a host or finds an available server, then creates a session.

    Connects to a host or finds an available server, then creates a session.

    host

    a server to connect to

    returns

    Future[Unit] or Exception

  20. def create(path: String, data: Array[Byte], acl: Seq[ACL], createMode: Int): Future[String]

    Create a node with the given path.

    Create a node with the given path. The node data will be the given data, and node acl will be the given acl.

    path

    the path for the node

    data

    the initial data for the node

    acl

    the acl for the node

    createMode

    specifying whether the node to be created is ephemeral and/or sequential

    returns

    Future[String] or Exception

  21. def create2(path: String, data: Array[Byte], acl: Seq[ACL], createMode: Int): Future[Create2Response]

    Create a node with the given path.

    Create a node with the given path. The node data will be the given data, and node acl will be the given acl.

    path

    the path for the node

    data

    the initial data for the node

    acl

    the acl for the node

    createMode

    specifying whether the node to be created is ephemeral and/or sequential

    returns

    Future[Create2Response] or Exception

    Since

    3.5.0

  22. def delete(path: String, version: Int): Future[Unit]

    Delete the node with the given path.

    Delete the node with the given path. The call will succeed if such a node exists, and the given version matches the node's version (if the given version is -1, it matches any node's versions).

    path

    the path of the node to be deleted.

    version

    the expected node version.

    returns

    Future[Unit] or Exception

  23. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  25. def exists(path: String, watch: Boolean = false): Future[ExistsResponse]

    Return the stat of the node of the given path.

    Return the stat of the node of the given path. Return null if no such a node exists.

    If the watch is non-null and the call is successful (no exception is thrown), a watch will be left on the node with the given path. The watch will be triggered by a successful operation that creates/delete the node or sets the data on the node.

    path

    the node path

    watch

    a boolean to set a watch or not

    returns

    an ExistsReponse

  26. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  27. def getACL(path: String): Future[GetACLResponse]

    Return the ACL and stat of the node of the given path.

    Return the ACL and stat of the node of the given path.

    path

    the node path

    returns

    Future[GetACLResponse] or Exception

  28. def getChildren(path: String, watch: Boolean = false): Future[GetChildrenResponse]

    For the given znode path return the stat and children list.

    For the given znode path return the stat and children list.

    If the watch is true and the call is successful (no exception is thrown), a watch will be left on the node with the given path. The watch will be triggered by a successful operation that deletes the node of the given path or creates/delete a child under the node.

    path

    the node path

    watch

    a boolean to set a watch or not

    returns

    Future[GetChildrenResponse] or Exception

  29. def getChildren2(path: String, watch: Boolean = false): Future[GetChildren2Response]

    For the given znode path return the stat and children list.

    For the given znode path return the stat and children list.

    If the watch is true and the call is successful (no exception is thrown), a watch will be left on the node with the given path. The watch will be triggered by a successful operation that deletes the node of the given path or creates/delete a child under the node.

    path

    the node path

    watch

    a boolean to set a watch or not

    returns

    Future[GetChildren2Response] or Exception

  30. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  31. def getConfig(watch: Boolean = false): Future[GetDataResponse]

    Return the last committed configuration (as known to the server to which the client is connected) and the stat of the configuration.

    Return the last committed configuration (as known to the server to which the client is connected) and the stat of the configuration.

    If the watch is true and the call is successful (no exception is thrown), a watch will be left on the configuration node. The watch will be triggered by a successful reconfig operation.

    watch

    set a watch or not

    returns

    configuration node data

    Since

    3.5.0

  32. def getData(path: String, watch: Boolean = false): Future[GetDataResponse]

    Return the data and the stat of the node of the given path.

    Return the data and the stat of the node of the given path.

    If the watch is non-null and the call is successful (no exception is thrown), a watch will be left on the node with the given path. The watch will be triggered by a successful operation that sets data on the node, or deletes the node.

    path

    the node path

    watch

    a boolean to set a watch or not

    returns

    Future[GetDataResponse] or Exception

  33. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  34. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  35. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  36. final def notify(): Unit

    Definition Classes
    AnyRef
  37. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  38. def reconfig(joiningServers: String, leavingServers: String, newMembers: String, fromConfig: Long): Future[GetDataResponse]

    Reconfigure - add/remove servers.

    Reconfigure - add/remove servers. Return the new configuration.

    joiningServers

    a comma separated list of servers being added (incremental reconfiguration)

    leavingServers

    a comma separated list of servers being removed (incremental reconfiguration)

    newMembers

    a comma separated list of new membership (non-incremental reconfiguration)

    fromConfig

    version of the current configuration (optional - causes reconfiguration to throw an exception if configuration is no longer current)

    returns

    configuration node data

    Since

    3.5.0

  39. def removeAllWatches(path: String, watcherType: Int, local: Boolean): Future[Unit]

    For the given znode path, removes all the registered watchers of given watcherType.

    For the given znode path, removes all the registered watchers of given watcherType.

    path

    the node path

    watcherType

    the watcher type (children, data, any)

    local

    whether watches can be removed locally when there is no server connection.

    returns

    Future[Unit]

    Since

    3.5.0

  40. def removeHosts(hostList: String): Future[Unit]

    Should remove some hosts from the host list

    Should remove some hosts from the host list

    hostList

    hosts to remove

    returns

    Future.Done or Exception

    Definition Classes
    ClientManager
  41. def removeWatches(watcher: Watcher, local: Boolean): Future[Unit]

    For the given znode path, removes the specified watcher.

    For the given znode path, removes the specified watcher.

    watcher

    the watcher to be removed

    local

    whether watches can be removed locally when there is no server connection.

    returns

    Future[Unit]

    Since

    3.5.0

  42. def session: Session

  43. def setACL(path: String, acl: Seq[ACL], version: Int): Future[Stat]

    Set the ACL for the node of the given path if such a node exists and the given version matches the version of the node.

    Set the ACL for the node of the given path if such a node exists and the given version matches the version of the node. Return the stat of the node.

    path

    the node path

    acl

    the ACLs to set

    version

    the node version

    returns

    the new znode stat

  44. def setData(path: String, data: Array[Byte], version: Int): Future[Stat]

    Set the data for the node of the given path if such a node exists and the given version matches the version of the node (if the given version is -1, it matches any node's versions).

    Set the data for the node of the given path if such a node exists and the given version matches the version of the node (if the given version is -1, it matches any node's versions). Return the stat of the node.

    This operation, if successful, will trigger all the watches on the node of the given path left by getData calls.

    The maximum allowable size of the data array is 1 MB (1,048,576 bytes). Arrays larger than this will cause a ZooKeeperException to be thrown.

    path

    the node path

    data

    the data Array

    version

    the node version

    returns

    the new znode stat

  45. def startRwSearch: Future[Unit]

    Should start to search a RW mode server.

    Should start to search a RW mode server.

    returns

    Future.Done

    Definition Classes
    ReadOnlyManager
  46. def startStateLoop(): Unit

    Start the loop which will check connection and session every timeBetweenLinkCheck

    Start the loop which will check connection and session every timeBetweenLinkCheck

    Definition Classes
    AutoLinkManager
  47. def stopRwSearch: Future[Unit]

    Should stop Rw mode server search.

    Should stop Rw mode server search.

    returns

    Future.Done

    Definition Classes
    ReadOnlyManager
  48. def stopStateLoop(): Unit

    Stop the state loop by cancelling its scheduler task

    Stop the state loop by cancelling its scheduler task

    Definition Classes
    AutoLinkManager
  49. def sync(path: String): Future[String]

    Synchronize client and server for a node.

    Synchronize client and server for a node.

    path

    the node path

    returns

    the synchronized znode's path

  50. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  51. def toString(): String

    Definition Classes
    AnyRef → Any
  52. def transaction(opList: Seq[OpRequest]): Future[TransactionResponse]

    Executes multiple ZooKeeper operations or none of them.

    Executes multiple ZooKeeper operations or none of them.

    On success, a list of results is returned. On failure, an exception is raised which contains partial results and error details. OpRequest: - CheckVersionRequest - CreateRequest - Create2Request (available in v3.5.0) - DeleteRequest - SetDataRequest

    opList

    a Sequence composed of OpRequest

    returns

    Future[TransactionResponse] or Exception

  53. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. lazy val watcherManager: WatcherManager

Inherited from ClientManager

Inherited from ReadOnlyManager

Inherited from AutoLinkManager

Inherited from Closable

Inherited from AnyRef

Inherited from Any

Ungrouped