kafka.common

ZkNodeChangeNotificationListener

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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

    zkUtils
    seqNodeRoot
    seqNodePrefix
    notificationHandler
    changeExpirationMs
    time

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object NodeChangeListener extends IZkChildListener

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

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

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

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

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    Logging
  21. def finalize(): Unit

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

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

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

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

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

    Definition Classes
    Logging
  27. def init(): Unit

    create seqNodeRoot and begin watching for any new children nodes.

  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. var logIdent: String

    Attributes
    protected
    Definition Classes
    Logging
  30. lazy val logger: Logger

    Definition Classes
    Logging
  31. val loggerName: String

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

    Definition Classes
    AnyRef
  33. final def notify(): Unit

    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  35. def processAllNotifications(): Unit

    Process all changes

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  43. def toString(): String

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

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

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

    Definition Classes
    Logging
  47. final def wait(): Unit

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

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

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

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

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

    Definition Classes
    Logging

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped