kafka.server

ZookeeperLeaderElector

class ZookeeperLeaderElector extends LeaderElector with Logging

This class handles zookeeper based leader election based on an ephemeral path. The election module does not handle session expiration, instead it assumes the caller will handle it by probably try to re-elect again. If the existing leader is dead, this class will handle automatic re-election and if it succeeds, it invokes the leader state change callback

Linear Supertypes
LeaderElector, Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ZookeeperLeaderElector
  2. LeaderElector
  3. Logging
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ZookeeperLeaderElector(controllerContext: ControllerContext, electionPath: String, onBecomingLeader: () ⇒ Unit, onResigningAsLeader: () ⇒ Unit, brokerId: Int)

Type Members

  1. class LeaderChangeListener extends IZkDataListener with Logging

    We do not have session expiration listen in the ZkElection, but assuming the caller who uses this module will have its own session expiration listener and handler

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. def amILeader: Boolean

    Definition Classes
    ZookeeperLeaderElectorLeaderElector
  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

    Definition Classes
    ZookeeperLeaderElectorLeaderElector
  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. def elect: Boolean

    Definition Classes
    ZookeeperLeaderElectorLeaderElector
  14. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

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

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

    Definition Classes
    Logging
  22. def finalize(): Unit

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

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

    Definition Classes
    AnyRef → Any
  25. val index: Int

  26. def info(msg: ⇒ String, e: ⇒ Throwable): Unit

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

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

    Definition Classes
    Logging
  29. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  30. val leaderChangeListener: LeaderChangeListener

  31. var leaderId: Int

  32. var logIdent: String

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

    Definition Classes
    Logging
  34. val loggerName: String

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

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

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

    Definition Classes
    AnyRef
  38. def resign(): Boolean

  39. def startup: Unit

    Definition Classes
    ZookeeperLeaderElectorLeaderElector
  40. def swallow(action: ⇒ Unit): Unit

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

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

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

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

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

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

    Definition Classes
    AnyRef
  47. def toString(): String

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

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

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

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

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

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

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

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

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

    Definition Classes
    Logging

Inherited from LeaderElector

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped