object Id

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

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val Anyone: Id

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

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

    Equivalent to WorldId.

  5. val Creator: Id

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

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

    This is a special identity, usable only while setting ACLs, that is substituted with the identities used during client authentication.

    Equivalent to AuthId.

  6. def apply(s: String): Id

    Constructs a new identity from the input string s.

    Constructs a new identity from the input string s.

    s

    a string representing the identity

    returns

    the identity in s if it conforms to the proper syntax

    Exceptions thrown

    IllegalArgumentException if s does not conform to the proper syntax

    See also

    parse

  7. def apply(scheme: String, id: String): Id

    Constructs a new identity.

    Constructs a new identity.

    scheme

    a string representing the scheme

    id

    a string representing the id

    returns

    an identity with the given scheme and id

    Exceptions thrown

    IllegalArgumentException if a valid identity cannot be constructed from scheme and id

    See also

    parse

  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def parse(s: String): Try[Id]

    Parses the identity in the input string s.

    Parses the identity in the input string s.

    The syntax of s is "scheme:id", where the : delimiter may be omitted if id is not required for the given scheme.

    s

    a string representing the identity

    returns

    a Success containing the identity in s if it conforms to the proper syntax, otherwise a Failure containing the offending exception

  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. implicit def tupleToIdentity(id: (String, String)): Id
  22. def unapply(id: Id): Option[(String, String)]

    Used in pattern matching to deconstruct an identity.

    Used in pattern matching to deconstruct an identity.

    id

    selector value

    returns

    a Some containing scheme and id if the selector value is not null, otherwise None

  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped