p

com.loopfor

zookeeper

package zookeeper

A Scala API for ZooKeeper.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. zookeeper
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class ACL(id: Id, permission: Int) extends org.apache.zookeeper.data.ACL with Product with Serializable

    An access control list assignable to a ZooKeeper node.

    An access control list assignable to a ZooKeeper node.

    id

    the identity to which permissions apply

    permission

    the bitwise union of permissions that apply to this ACL

  2. type APIErrorException = org.apache.zookeeper.KeeperException.APIErrorException
  3. trait AsynchronousWatchableZookeeper extends Zookeeper

    A ZooKeeper client with asynchronous and watchable operations.

  4. trait AsynchronousZookeeper extends Zookeeper

    A ZooKeeper client with asynchronous operations.

  5. type AuthFailedException = org.apache.zookeeper.KeeperException.AuthFailedException
  6. type BadArgumentsException = org.apache.zookeeper.KeeperException.BadArgumentsException
  7. type BadVersionException = org.apache.zookeeper.KeeperException.BadVersionException
  8. abstract class BaseId extends Id
  9. case class CheckOperation(path: String, version: Option[Int]) extends Operation with Product with Serializable

    A check operation.

    A check operation.

    path

    the path of the node

    version

    a Some containing the expected version of the node or None if a version match is not required

  10. case class CheckProblem(op: CheckOperation, error: Option[KeeperException]) extends Problem with Product with Serializable

    A problem with a check operation.

    A problem with a check operation.

    op

    the check operation corresponding to this problem

    error

    a Some containing the exception that led to this problem or None if no problem was reported

  11. case class CheckResult(op: CheckOperation) extends Result with Product with Serializable

    The result of a check operation.

    The result of a check operation.

    op

    the check operation corresponding to this result

  12. case class ChildWatchRemoved(path: String) extends NodeEvent with Product with Serializable

    An event indicating that a child watch was removed.

  13. case class ChildrenChanged(path: String) extends NodeEvent with Product with Serializable

    An event indicating that the children associated with a node were changed.

  14. trait Configuration extends AnyRef

    A client configuration for connecting to a ZooKeeper cluster.

  15. type ConnectionLossException = org.apache.zookeeper.KeeperException.ConnectionLossException
  16. case class CreateOperation(path: String, data: Array[Byte], acl: Seq[ACL], disp: Disposition) extends Operation with Product with Serializable

    A create operation.

    A create operation.

    path

    the path of the node

    data

    the data to associate with the node

    acl

    the ACL to associate with the node

    disp

    the disposition of the node

  17. case class CreateProblem(op: CreateOperation, error: Option[KeeperException]) extends Problem with Product with Serializable

    A problem with a create operation.

    A problem with a create operation.

    op

    the create operation corresponding to this problem

    error

    a Some containing the exception that led to this problem or None if no problem was reported

  18. case class CreateResult(op: CreateOperation, path: String) extends Result with Product with Serializable

    The result of a create operation.

    The result of a create operation.

    op

    the create operation corresponding to this result

    path

    the final path of the created node, which will differ from the path in op if either PersistentSequential PersistentSequentialTimeToLive or EphemeralSequential disposition is specified

  19. case class Created(path: String) extends NodeEvent with Product with Serializable

    An event indicating that a node was created.

  20. trait Credential extends AnyRef

    A credential with a ZooKeeper session.

  21. case class DataChanged(path: String) extends NodeEvent with Product with Serializable

    An event indicating that the data associated with a node was changed.

  22. type DataInconsistencyException = org.apache.zookeeper.KeeperException.DataInconsistencyException
  23. case class DataWatchRemoved(path: String) extends NodeEvent with Product with Serializable

    An event indicating that a data watch was removed.

  24. case class DeleteOperation(path: String, version: Option[Int]) extends Operation with Product with Serializable

    A delete operation.

    A delete operation.

    path

    the path of the node

    version

    a Some containing the expected version of the node or None if a version match is not required

  25. case class DeleteProblem(op: DeleteOperation, error: Option[KeeperException]) extends Problem with Product with Serializable

    A problem with a delete operation.

    A problem with a delete operation.

    op

    the delete operation corresponding to this problem

    error

    a Some containing the exception that led to this problem or None if no problem was reported

  26. case class DeleteResult(op: DeleteOperation) extends Result with Product with Serializable

    The result of a delete operation.

    The result of a delete operation.

    op

    the delete operation corresponding to this result

  27. case class Deleted(path: String) extends NodeEvent with Product with Serializable

    An event indicating that a node was deleted.

  28. case class DigestId(username: String, password: String) extends BaseId with Product with Serializable

    An identity whose scheme is "digest" and id is equal to "username:password".

    An identity whose scheme is "digest" and id is equal to "username:password".

    username

    a username, which may be empty

    password

    a cleartext password, which may be empty

    See also

    Schemes

  29. sealed trait Disposition extends AnyRef

    Specifies the disposition of nodes when created.

  30. type EphemeralOnLocalSessionException = org.apache.zookeeper.KeeperException.EphemeralOnLocalSessionException
  31. sealed trait Event extends AnyRef

    An event generated by ZooKeeper.

  32. case class HostId(domain: String) extends BaseId with Product with Serializable

    An identity whose scheme is "host" and id is equal to "domain".

    An identity whose scheme is "host" and id is equal to "domain".

    domain

    an internet domain name

    See also

    Schemes

  33. sealed trait Id extends AnyRef

    An identity associated with an ACL.

  34. type InvalidACLException = org.apache.zookeeper.KeeperException.InvalidACLException
  35. type InvalidCallbackException = org.apache.zookeeper.KeeperException.InvalidCallbackException
  36. case class IpId(addr: String, prefix: Int) extends BaseId with Product with Serializable

    An identity whose scheme is "ip" and id is equal to "addr/prefix".

    An identity whose scheme is "ip" and id is equal to "addr/prefix".

    addr

    an IPv4 or IPv6 address in dotted decimal form

    prefix

    the network prefix in bits, a range of [0,32] for IPv4 and [0,128] for IPv6

    See also

    Schemes

  37. type KeeperException = org.apache.zookeeper.KeeperException
  38. type MarshallingErrorException = org.apache.zookeeper.KeeperException.MarshallingErrorException
  39. type NewConfigNoQuorum = org.apache.zookeeper.KeeperException.NewConfigNoQuorum
  40. type NoAuthException = org.apache.zookeeper.KeeperException.NoAuthException
  41. type NoChildrenForEphemeralsException = org.apache.zookeeper.KeeperException.NoChildrenForEphemeralsException
  42. type NoNodeException = org.apache.zookeeper.KeeperException.NoNodeException
  43. type NoWatcherException = org.apache.zookeeper.KeeperException.NoWatcherException
  44. trait Node extends AnyRef

    Represents a node in ZooKeeper.

  45. trait NodeEvent extends Event

    A category of events representing changes to nodes.

  46. type NodeExistsException = org.apache.zookeeper.KeeperException.NodeExistsException
  47. type NotEmptyException = org.apache.zookeeper.KeeperException.NotEmptyException
  48. type NotReadOnlyException = org.apache.zookeeper.KeeperException.NotReadOnlyException
  49. sealed trait Operation extends AnyRef

    An operation that may be composed with others to form an atomic transaction to ZooKeeper.

  50. type OperationTimeoutException = org.apache.zookeeper.KeeperException.OperationTimeoutException
  51. trait Path extends AnyRef

    Represents an absolute or relative path to a node in ZooKeeper.

    Represents an absolute or relative path to a node in ZooKeeper.

    An absolute path starts with the / character. All other forms are considered relative. Paths are virtually identical to those on Unix file systems and may include both . and .. parts, indicating the current and parent node, respectively.

    Examples:

    "/"
    "../foo"
    "/foo/bar"
    "./foo/../bar"
  52. class PersistentSequentialTimeToLive extends Disposition with TimeToLive

    Indicates that a node will persist when the creator disconnects from ZooKeeper and that the name will be appended with a monotonically increasing number.

    Indicates that a node will persist when the creator disconnects from ZooKeeper and that the name will be appended with a monotonically increasing number.

    The node will be eligible for deletion if not modified within the given ttl and only after all its children have been deleted.

  53. class PersistentTimeToLive extends Disposition with TimeToLive

    Indicates that a node will persist when the creator disconnects from ZooKeeper.

    Indicates that a node will persist when the creator disconnects from ZooKeeper.

    The node will be eligible for deletion if not modified within the given ttl and only after all its children have been deleted.

  54. sealed trait Problem extends AnyRef

    A problem with an operation in the context of an atomic operation.

  55. type ReconfigDisabledException = org.apache.zookeeper.KeeperException.ReconfigDisabledException
  56. type ReconfigInProgress = org.apache.zookeeper.KeeperException.ReconfigInProgress
  57. type RequestTimeoutException = org.apache.zookeeper.KeeperException.RequestTimeoutException
  58. sealed trait Result extends AnyRef

    The result of an operation within an atomic transaction.

  59. type RuntimeInconsistencyException = org.apache.zookeeper.KeeperException.RuntimeInconsistencyException
  60. trait Session extends AnyRef

    A session established with ZooKeeper.

    A session established with ZooKeeper.

    Note that a session, particularly the life cycle, is managed by ZooKeeper servers, not the client. Under normal circumstances in which the client explicitly disconnects from the ZooKeeper cluster, its session is automatically expired. However, in cases where the client does not properly disconnect, ZooKeeper retains the session for a period of time defined by timeout.

  61. type SessionExpiredException = org.apache.zookeeper.KeeperException.SessionExpiredException
  62. type SessionMovedException = org.apache.zookeeper.KeeperException.SessionMovedException
  63. case class SetOperation(path: String, data: Array[Byte], version: Option[Int]) extends Operation with Product with Serializable

    A set operation.

    A set operation.

    path

    the path of the node

    data

    the data to associate with the node

    version

    a Some containing the expected version of the node or None if a version match is not required

  64. case class SetProblem(op: SetOperation, error: Option[KeeperException]) extends Problem with Product with Serializable

    A problem with a set operation.

    A problem with a set operation.

    op

    the set operation corrresponding to this problem

    error

    a Some containing the exception that led to this problem or None if no problem was reported

  65. case class SetResult(op: SetOperation, status: Status) extends Result with Product with Serializable

    The result of a set operation.

    The result of a set operation.

    op

    the set operation corresponding to this result

  66. sealed trait State extends AnyRef

    The state of a ZooKeeper session.

  67. trait StateEvent extends Event

    A category of events representing state changes to sessions.

  68. trait Status extends AnyRef

    The status of a ZooKeeper node.

    The status of a ZooKeeper node.

    Each modification to ZooKeeper is stamped with a monotonically-increasing sequence number, known as a transaction id or zxid, which conveys a total ordering of all changes. Thus, given any two changes, A and B, denoted by transaction ids, zxidA and zxidB, respectively, A is said to happen before B if zxidA < zxidB. Note that the transaction id is scoped to the entire ZooKeeper repository, not to individual nodes.

    In addition to stamping all repository changes with a transaction id, which establishes total order, each modification to a given node also causes some version of that node to increment.

  69. trait SynchronousWatchableZookeeper extends Zookeeper

    A ZooKeeper client with synchronous and watchable operations.

  70. trait SynchronousZookeeper extends Zookeeper

    A ZooKeeper client with synchronous operations.

  71. type SystemErrorException = org.apache.zookeeper.KeeperException.SystemErrorException
  72. sealed trait TimeToLive extends AnyRef

    Specifies time-to-live for certain types of dispositions.

  73. type UnimplementedException = org.apache.zookeeper.KeeperException.UnimplementedException
  74. type UnknownSessionException = org.apache.zookeeper.KeeperException.UnknownSessionException
  75. trait Zookeeper extends AnyRef

    An instance of a ZooKeeper client.

Value Members

  1. implicit def tupleToInetSocketAddress(addr: (String, Int)): InetSocketAddress

    Converts the tuple (host,port) to an Internet socket address.

    Converts the tuple (host,port) to an Internet socket address.

    returns

    an InetSocketAddress composed from the given addr tuple

  2. object ACL extends Serializable

    Constructs and deconstructs ACL values.

    Constructs and deconstructs ACL values.

    The permissions assigned to an ACL are constructed by performing a bitwise union of individual permission attributes: Read, Write, Create, Delete, Admin. In addition, the All permission encompasses all of these attributes.

    Several commonly used ACL values have been predefined for sake of convenience: AnyoneAll, AnyoneRead, CreatorAll.

    See also

    ACLs

  3. case object AssociatingState extends State with Product with Serializable

    A state indicating that the session is in the process of associating.

  4. object AsynchronousZookeeper

    Constructs AsynchronousZookeeper values.

    Constructs AsynchronousZookeeper values.

    This companion object is provided as a convenience and is equivalent to:

    Zookeeper(...).async
    See also

    Zookeeper

  5. case object AuthId extends BaseId with Product with Serializable

    An identity whose scheme is "auth" and id is "".

    An identity whose scheme is "auth" and id is "".

    See also

    Schemes

  6. case object Authenticated extends StateEvent with Product with Serializable

    An event indicating that the client successfully authenticated with ZooKeeper.

  7. case object AuthenticationFailed extends StateEvent with Product with Serializable

    An event indicating that the client failed to authenticate with ZooKeeper.

  8. case object AuthenticationFailedState extends State with Product with Serializable

    A state indicating that session authentication failed.

  9. case object Closed extends StateEvent with Product with Serializable

    An event indicating that the client has closed its session with ZooKeeper.

  10. case object ClosedState extends State with Product with Serializable

    A state indicating that the session has been closed.

  11. object Configuration

    Constructs and deconstructs Configuration values.

    Constructs and deconstructs Configuration values.

    A configuration is constructed by first specifying required attributes via Configuration() and then attaching optional attributes as necessary. A set of implicit methods conveniently convert between instances of Configuration and Builder.

    Example:

    val config = Configuration {
      ("foo.server.com", 2181) :: ("bar.server.com", 2181) :: Nil
    } withTimeout {
      60 seconds
    } withWatcher { (event, session) =>
      // ...
    }

    The type of config above is Builder since an implicit conversion occurred when attaching optional attributes using the various with methods. An explicit conversion back to Configuration, which can be accomplished using build(), is unnecessary since another implicit will perform this function automatically.

  12. case object Connected extends StateEvent with Product with Serializable

    An event indicating that the client is connected to ZooKeeper.

  13. case object ConnectedReadOnly extends StateEvent with Product with Serializable

    An event indicating that the client is connected to ZooKeeper in a read-only manner.

  14. case object ConnectedReadOnlyState extends State with Product with Serializable

    A state indicating that the session is connected in read-only mode.

  15. case object ConnectedState extends State with Product with Serializable

    A state indicating that the session is connected.

  16. case object ConnectingState extends State with Product with Serializable

    A state indicating that the session is in the process of connecting.

  17. object Container extends Disposition

    Indicates that a node will be designated as a special purpose container useful for building higher-order constructs, such as leader election and locking.

    Indicates that a node will be designated as a special purpose container useful for building higher-order constructs, such as leader election and locking.

    The node will be eligible for deletion once all children have been deleted.

  18. object Credential

    Constructs and deconstructs Credential values.

  19. case object Disconnected extends StateEvent with Product with Serializable

    An event indicating that the client is not connected to ZooKeeper.

  20. object Ephemeral extends Disposition

    Indicates that a node will be automatically deleted when the creator disconnects from ZooKeeper.

  21. object EphemeralSequential extends Disposition

    Indicates that a node will be automatically deleted when the creator disconnects from ZooKeeper and that the name will be appended with a monotonically increasing number.

  22. case object Expired extends StateEvent with Product with Serializable

    An event indicating that the client session has been expired by ZooKeeper.

  23. object Id

    Constructs and deconstructs Id values.

    Constructs and deconstructs Id values.

    An Id is composed of two parts: a scheme and an id. There exists only a finite set of schemes recognized by ZooKeeper, which are noted below. The acceptable form of id depends on the chosen scheme.

    Schemes

    world -- id must be "anyone".

    auth -- id must be "" (empty string).

    digest -- id must be of the form "username:password".

    host -- id should be an Internet domain name.

    ip -- id must be a valid IPv4 or IPv6 address with an optional network prefix, variations of which follow:

    • "addr" where prefix is assumed to be 32 and 128 for IPv4 and IPv6, respectively.
    • "addr/prefix" where prefix is in the range [0,32] and [0,128] for IPv4 and IPv6, respectively.
    See also

    Schemes

  24. object Node

    Constructs and deconstructs Node values.

  25. case object NotConnectedState extends State with Product with Serializable

    A state indicating that the session is not connected.

  26. object Path

    Constructs and deconstructs Path values.

  27. object Persistent extends Disposition

    Indicates that a node will persist when the creator disconnects from ZooKeeper.

  28. object PersistentSequential extends Disposition

    Indicates that a node will persist when the creator disconnects from ZooKeeper and that the name will be appended with a monotonically increasing number.

  29. object PersistentSequentialTimeToLive

    Constructs PersistentSequentialTimeToLive values.

  30. object PersistentTimeToLive

    Constructs PersistentTimeToLive values.

  31. object Session

    Constructs and deconstructs Session values.

  32. object SynchronousZookeeper

    Constructs SynchronousZookeeper values.

    Constructs SynchronousZookeeper values.

    This companion object is provided as a convenience and is equivalent to:

    Zookeeper(...).sync
    See also

    Zookeeper

  33. object TimeToLive

    Constructs TimeToLive values.

  34. case object WorldId extends BaseId with Product with Serializable

    An identity whose scheme is "world" and id is "anyone".

    An identity whose scheme is "world" and id is "anyone".

    See also

    Schemes

  35. object Zookeeper

    Constructs Zookeeper values.

Inherited from AnyRef

Inherited from Any

Ungrouped