com.loopfor.zookeeper.Configuration$
See theConfiguration companion trait
object Configuration
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.
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- Configuration.type