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 be32
and128
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
- Alphabetic
- By Inheritance
- Id
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- 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.
- 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.
- 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
ifs
does not conform to the proper syntax- See also
- 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
andid
- Exceptions thrown
IllegalArgumentException
if a valid identity cannot be constructed fromscheme
andid
- See also
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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 ins
if it conforms to the proper syntax, otherwise aFailure
containing the offending exception
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- implicit def tupleToIdentity(id: (String, String)): Id
- 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
containingscheme
andid
if the selector value is notnull
, otherwiseNone
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])