trait
ZookeeperStateMonitor extends AnyRef
Abstract Value Members
-
abstract
def
applyZKData(data: Array[Byte]): Unit
-
abstract
val
statsReceiver: StatsReceiver
-
abstract
val
zkClient: ZooKeeperClient
-
abstract
val
zkPath: String
Concrete Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
def
applyZKChildren(children: List[String]): Unit
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
def
loadZKChildren: () ⇒ Unit
-
def
loadZKData: () ⇒ Unit
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
reconnectZK: () ⇒ Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
A zk monitor trait that assists with monitoring a given zk path for any node data change, in which the provided zk data handling implementation will be invoked.
This monitor will maintain a queue so that every work item triggered by zk event will be processed in an order with a back off policy. It also set-up a zookeeper connection watcher by default to re-set the data change watcher even during zk re-connect.
The monitor will set-up all watcher properly kick off the loop to process future event; you can also invoke loadZKData() in your class anytime to force reading zk data and apply it.
Example use cases are: - zookeeper based CachePoolCluster uses this to monitor cache pool members change - zookeeper based MigrationClient uses this ot monitor migration state transitioning