object ZooKeeper
- Alphabetic
- By Inheritance
- ZooKeeper
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fromResource[F[_]](customConfig: List[KnobsResource])(k: (ResourceBox) ⇒ F[Unit])(implicit F: Effect[F], ec: ExecutionContext): F[Unit]
IO-based API.
IO-based API. Works just like
withDefault
except it loads configuration from specified resource.Example usage:
import knobs._
ZooKeeper.fromResource(List(Required(ClassPathResource("speech-service.conf")))) { r => for { cfg <- load(Required(r)) // Application code here } yield () }.run
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
safe[F[_]](k: (ResourceBox) ⇒ F[Unit], config: List[KnobsResource] = null)(implicit F: Effect[F], ec: ExecutionContext): F[Unit]
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
watchEvent[F[_]](c: CuratorFramework, path: Path)(implicit F: Async[F]): Stream[F, WatchedEvent]
A process that produces an event when the given path's data changes.
A process that produces an event when the given path's data changes. This process only contains a single event. To subscribe to multiple events, call
repeat
on the result of this method. With only one event, we prevent multiple reloads occurring simultaneously inWatched
znodes. -
def
withDefault[F[_]](k: (ResourceBox) ⇒ F[Unit])(implicit F: Effect[F], ec: ExecutionContext): F[Unit]
IO-based API.
IO-based API. Loads the standard configuration from /usr/share/oncue/etc/zookeeper.cfg or, failing that, from the classpath at oncue/zookeeper.cfg.
Expects
zookeeper.connectionString
to be defined in that cfg file, which is a string of the form "hostname:port".Expects
zookeeper.pathToConfig
to be defined as well, which is the zookeeper path to the ZNode that contains the configuration.Manages the lifecycle of the ZooKeeper connection for you.
Usage example:
import knobs._
ZooKeeper.withDefault { r => for { cfg <- load(Required(r)) // Application code here } yield () }.run
- implicit def zkResource(implicit ec: ExecutionContext): Watchable[ZNode]