Class

kafka.common

ZkNodeChangeNotificationListener

Related Doc: package common

Permalink

class ZkNodeChangeNotificationListener extends Logging

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.

Linear Supertypes
Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ZkNodeChangeNotificationListener
  2. Logging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ZkNodeChangeNotificationListener(zkUtils: ZkUtils, seqNodeRoot: String, seqNodePrefix: String, notificationHandler: NotificationHandler, changeExpirationMs: Long = 15 * 60 * 1000, time: Time = SystemTime)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object NodeChangeListener extends IZkChildListener

    Permalink

    A listener that gets invoked when a node is created to notify changes.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def close(): Unit

    Permalink
  8. def debug(msg: ⇒ String, e: ⇒ Throwable): Unit

    Permalink
    Definition Classes
    Logging
  9. def debug(e: ⇒ Throwable): Any

    Permalink
    Definition Classes
    Logging
  10. def debug(msg: ⇒ String): Unit

    Permalink
    Definition Classes
    Logging
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def error(msg: ⇒ String, e: ⇒ Throwable): Unit

    Permalink
    Definition Classes
    Logging
  14. def error(e: ⇒ Throwable): Any

    Permalink
    Definition Classes
    Logging
  15. def error(msg: ⇒ String): Unit

    Permalink
    Definition Classes
    Logging
  16. def fatal(msg: ⇒ String, e: ⇒ Throwable): Unit

    Permalink
    Definition Classes
    Logging
  17. def fatal(e: ⇒ Throwable): Any

    Permalink
    Definition Classes
    Logging
  18. def fatal(msg: ⇒ String): Unit

    Permalink
    Definition Classes
    Logging
  19. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  22. def info(msg: ⇒ String, e: ⇒ Throwable): Unit

    Permalink
    Definition Classes
    Logging
  23. def info(e: ⇒ Throwable): Any

    Permalink
    Definition Classes
    Logging
  24. def info(msg: ⇒ String): Unit

    Permalink
    Definition Classes
    Logging
  25. def init(): Unit

    Permalink

    create seqNodeRoot and begin watching for any new children nodes.

  26. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  27. var logIdent: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  28. lazy val logger: Logger

    Permalink
    Definition Classes
    Logging
  29. val loggerName: String

    Permalink
    Definition Classes
    Logging
  30. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. def processAllNotifications(): Unit

    Permalink

    Process all changes

  34. def swallow(action: ⇒ Unit): Unit

    Permalink
    Definition Classes
    Logging
  35. def swallowDebug(action: ⇒ Unit): Unit

    Permalink
    Definition Classes
    Logging
  36. def swallowError(action: ⇒ Unit): Unit

    Permalink
    Definition Classes
    Logging
  37. def swallowInfo(action: ⇒ Unit): Unit

    Permalink
    Definition Classes
    Logging
  38. def swallowTrace(action: ⇒ Unit): Unit

    Permalink
    Definition Classes
    Logging
  39. def swallowWarn(action: ⇒ Unit): Unit

    Permalink
    Definition Classes
    Logging
  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  41. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  42. def trace(msg: ⇒ String, e: ⇒ Throwable): Unit

    Permalink
    Definition Classes
    Logging
  43. def trace(e: ⇒ Throwable): Any

    Permalink
    Definition Classes
    Logging
  44. def trace(msg: ⇒ String): Unit

    Permalink
    Definition Classes
    Logging
  45. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. def warn(msg: ⇒ String, e: ⇒ Throwable): Unit

    Permalink
    Definition Classes
    Logging
  49. def warn(e: ⇒ Throwable): Any

    Permalink
    Definition Classes
    Logging
  50. def warn(msg: ⇒ String): Unit

    Permalink
    Definition Classes
    Logging

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped