nirvana.support.services

ZookeeperTemplate

class ZookeeperTemplate extends ServiceLifecycle with LoggerSupport with ZkClientSupport with ZkDeletePathSupport with ZkPathCreatorSupport with ZkNodeDataSupport with RunInNoExceptionThrown with ZkChildrenSupport with ZkEphemeralPathSupport

zookeeper template

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ZookeeperTemplate
  2. ZkEphemeralPathSupport
  3. ZkChildrenSupport
  4. RunInNoExceptionThrown
  5. ZkNodeDataSupport
  6. ZkPathCreatorSupport
  7. ZkDeletePathSupport
  8. ZkClientSupport
  9. ServiceWaitingInitSupport
  10. LoggerSupport
  11. ServiceLifecycle
  12. AnyRef
  13. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ZookeeperTemplate(address: String, basePath: Option[String] = None, sessionTimeout: Int = 6000)

Type Members

  1. sealed class EphemeralMode extends AnyRef

    Definition Classes
    ZkEphemeralPathSupport
  2. sealed class WatchMode extends AnyRef

    Definition Classes
    ZkClientSupport

Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. object NormalEphemeralMode extends (ZkEphemeralPathSupport.this)#EphemeralMode with Product with Serializable

    Definition Classes
    ZkEphemeralPathSupport
  5. object OnceWatch extends ZookeeperTemplate.WatchMode with Product with Serializable

    Definition Classes
    ZkClientSupport
  6. object PermanentWatch extends ZookeeperTemplate.WatchMode with Product with Serializable

    Definition Classes
    ZkClientSupport
  7. object SequenceEphemeralMode extends (ZkEphemeralPathSupport.this)#EphemeralMode with Product with Serializable

    Definition Classes
    ZkEphemeralPathSupport
  8. val address: String

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def awaitServiceInit(): Unit

    等待1分钟,服务初始化

    等待1分钟,服务初始化

    Attributes
    protected
    Definition Classes
    ServiceWaitingInitSupport
  11. def awaitServiceInit(time: Long, unit: TimeUnit): Boolean

    等待服务初始化

    等待服务初始化

    time

    等待时间

    unit

    时间单元

    returns

    是否初始化完成

    Attributes
    protected
    Definition Classes
    ServiceWaitingInitSupport
  12. val basePath: Option[String]

  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def createEphemeralPath(path: String, data: Option[Array[Byte]] = None, mode: EphemeralMode = NormalEphemeralMode, isPermanent: Boolean = true): Unit

    创建临时节点

    创建临时节点

    path

    目标路径

    data

    原始数据

    mode

    模式

    isPermanent

    永远跟踪

    Definition Classes
    ZkEphemeralPathSupport
  15. def createEphemeralPathWithStringData(path: String, data: Option[String] = None, mode: EphemeralMode = NormalEphemeralMode, isPermanent: Boolean = true): Unit

    创建临时节点

    创建临时节点

    path

    目标路径

    data

    原始数据

    mode

    模式

    isPermanent

    永远跟踪

    Definition Classes
    ZkEphemeralPathSupport
  16. def createPersistPath(path: String, data: Option[Array[Byte]] = None): Unit

    Definition Classes
    ZkPathCreatorSupport
  17. def createPersistPathWithString(path: String, data: Option[String] = None): Unit

    Definition Classes
    ZkPathCreatorSupport
  18. def delete(path: String): Unit

    Definition Classes
    ZkDeletePathSupport
  19. def deleteRecursive(path: String): Unit

    Definition Classes
    ZkChildrenSupport
  20. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  22. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. def getChildren(path: String): Seq[String]

    Definition Classes
    ZkChildrenSupport
  24. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  25. def getData(path: String, stat: Option[Stat] = None): Option[Array[Byte]]

    获取节点数据

    获取节点数据

    path

    节点的路径

    stat

    节点的stat状态信息,作为返回值返回

    returns

    节点数据

    Definition Classes
    ZkNodeDataSupport
  26. def getDataAsString(path: String, stat: Option[Stat] = None): Option[String]

    得到节点内容作为一个字符串

    得到节点内容作为一个字符串

    path

    节点路径

    stat

    节点的stat信息,作为返回信息

    returns

    作为String返回节点的数据

    Definition Classes
    ZkNodeDataSupport
  27. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  28. def internalCreatePath(path: String, data: Option[Array[Byte]] = None, createMode: CreateMode = CreateMode.PERSISTENT): Unit

    Attributes
    protected
    Definition Classes
    ZkPathCreatorSupport
  29. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  30. val logger: Logger

    Attributes
    protected
    Definition Classes
    LoggerSupport
  31. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  34. def recreateEphemeralNodes(): Unit

    Attributes
    protected
    Definition Classes
    ZkEphemeralPathSupport
  35. def retryFailedChildrenWatcher(): Unit

    Attributes
    protected
    Definition Classes
    ZkChildrenSupport
  36. def retryFailedEphemeralNodes(): Unit

    Attributes
    protected
    Definition Classes
    ZkEphemeralPathSupport
  37. def retryFailedWatchNodeData(): Unit

    Attributes
    protected
    Definition Classes
    ZkNodeDataSupport
  38. def rewatchChildren: Unit

    Attributes
    protected
    Definition Classes
    ZkChildrenSupport
  39. def rewatchNodeData: Unit

    Attributes
    protected
    Definition Classes
    ZkNodeDataSupport
  40. def runInNotExceptionThrown(fun: ⇒ Unit): Unit

    Definition Classes
    RunInNoExceptionThrown
  41. def serviceInitialized(): Unit

    标记服务已经初始化完毕

    标记服务已经初始化完毕

    Attributes
    protected
    Definition Classes
    ServiceWaitingInitSupport
  42. val sessionTimeout: Int

  43. def setData(path: String, data: Array[Byte], stat: Option[Stat] = None): Unit

    设置某一节点的数据

    设置某一节点的数据

    path

    节点路径

    data

    节点数据

    stat

    节点的状态

    Definition Classes
    ZkNodeDataSupport
  44. def setStringData(path: String, data: String, stat: Option[Stat] = None, encoding: String = ...): Unit

    把字符串设置到某一节点

    把字符串设置到某一节点

    path

    节点路径

    data

    数据

    stat

    节点的状态信息

    encoding

    字符串的编码格式

    Definition Classes
    ZkNodeDataSupport
  45. def shutdown(): Unit

    关闭对象

    关闭对象

    Definition Classes
    ZkClientSupportServiceLifecycle
  46. def start(): Unit

    启动对象实例

    启动对象实例

    Definition Classes
    ZkClientSupportServiceLifecycle
  47. def startCheckFailed(periodExecutor: PeriodicExecutor): Unit

    启动对异常数据的检测,实现FailBack功能

    启动对异常数据的检测,实现FailBack功能

    periodExecutor

    定时执行器

    Definition Classes
    ZkClientSupport
  48. def stat(path: String): Option[Stat]

    得到某一节点信息

    得到某一节点信息

    path

    节点路径

    returns

    节点信息

    Definition Classes
    ZkNodeDataSupport
  49. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  50. def throwExceptionIfServiceInitialized(): Unit

    判断服务是否已经初始化

    判断服务是否已经初始化

    Attributes
    protected
    Definition Classes
    ServiceWaitingInitSupport
  51. def toString(): String

    Definition Classes
    AnyRef → Any
  52. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. def watchChildren(path: String, watcher: ChildrenDataWatcher): Unit

    Definition Classes
    ZkChildrenSupport
  56. def watchNodeData(path: String, watcher: NodeDataWatcher): Unit

    watch某一节点数据

    watch某一节点数据

    path

    节点路径

    watcher

    节点watcher

    Definition Classes
    ZkNodeDataSupport
  57. def zkClient: CuratorFramework

    得到Zookeeper的客户端

    得到Zookeeper的客户端

    returns

    zookeeper client

    Definition Classes
    ZkClientSupport

Inherited from ZkEphemeralPathSupport

Inherited from ZkChildrenSupport

Inherited from RunInNoExceptionThrown

Inherited from ZkNodeDataSupport

Inherited from ZkPathCreatorSupport

Inherited from ZkDeletePathSupport

Inherited from ZkClientSupport

Inherited from ServiceWaitingInitSupport

Inherited from LoggerSupport

Inherited from ServiceLifecycle

Inherited from AnyRef

Inherited from Any

Ungrouped