class
ZkNodeChangeNotificationListener extends Logging
Instance Constructors
-
new
ZkNodeChangeNotificationListener(zkUtils: ZkUtils, seqNodeRoot: String, seqNodePrefix: String, notificationHandler: NotificationHandler, changeExpirationMs: Long = 15 * 60 * 1000, time: Time = SystemTime)
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
def
close(): Unit
-
def
debug(msg: ⇒ String, e: ⇒ Throwable): Unit
-
def
debug(e: ⇒ Throwable): Any
-
def
debug(msg: ⇒ String): Unit
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
error(msg: ⇒ String, e: ⇒ Throwable): Unit
-
def
error(e: ⇒ Throwable): Any
-
def
error(msg: ⇒ String): Unit
-
def
fatal(msg: ⇒ String, e: ⇒ Throwable): Unit
-
def
fatal(e: ⇒ Throwable): Any
-
def
fatal(msg: ⇒ String): Unit
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
def
info(msg: ⇒ String, e: ⇒ Throwable): Unit
-
def
info(e: ⇒ Throwable): Any
-
def
info(msg: ⇒ String): Unit
-
def
init(): Unit
-
final
def
isInstanceOf[T0]: Boolean
-
var
logIdent: String
-
lazy val
logger: Logger
-
val
loggerName: String
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
processAllNotifications(): Unit
-
def
swallow(action: ⇒ Unit): Unit
-
def
swallowDebug(action: ⇒ Unit): Unit
-
def
swallowError(action: ⇒ Unit): Unit
-
def
swallowInfo(action: ⇒ Unit): Unit
-
def
swallowTrace(action: ⇒ Unit): Unit
-
def
swallowWarn(action: ⇒ Unit): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
def
trace(msg: ⇒ String, e: ⇒ Throwable): Unit
-
def
trace(e: ⇒ Throwable): Any
-
def
trace(msg: ⇒ String): Unit
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
warn(msg: ⇒ String, e: ⇒ Throwable): Unit
-
def
warn(e: ⇒ Throwable): Any
-
def
warn(msg: ⇒ String): Unit
Inherited from AnyRef
Inherited from Any
A listener that subscribes to seqNodeRoot for any child changes where all children are assumed to be sequence node with seqNodePrefix. When a child is added under seqNodeRoot this class gets notified, it looks at lastExecutedChange number to avoid duplicate processing and if it finds an unprocessed child, it reads its data and calls supplied notificationHandler's processNotification() method with the child's data as argument. As part of processing these changes it also purges any children with currentTime - createTime > changeExpirationMs.
The caller/user of this class should ensure that they use zkClient.subscribeStateChanges and call processAllNotifications method of this class from ZkStateChangeListener's handleNewSession() method. This is necessary to ensure that if zk session is terminated and reestablished any missed notification will be processed immediately.