Class

stark.utils.services

ZookeeperTemplate

Related Doc: package services

Permalink

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

zookeeper template

Annotations
@EagerLoad()
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ZookeeperTemplate
  2. ZkEphemeralPathSupport
  3. ZkChildrenSupport
  4. RunInNoExceptionThrown
  5. ZkNodeDataSupport
  6. ZkPathCreatorSupport
  7. ZkDeletePathSupport
  8. LoggerSupport
  9. ZkClientSupport
  10. ServiceWaitingInitSupport
  11. AnyRef
  12. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

Type Members

  1. sealed class WatchMode extends AnyRef

    Permalink
    Definition Classes
    ZkClientSupport

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 OnceWatch extends ZookeeperTemplate.WatchMode with Product with Serializable

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

    Permalink
    Definition Classes
    ZkClientSupport
  6. val address: String

    Permalink
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def awaitServiceInit(): Unit

    Permalink

    等待1分钟,服务初始化

    等待1分钟,服务初始化

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

    Permalink

    等待服务初始化

    等待服务初始化

    time

    等待时间

    unit

    时间单元

    returns

    是否初始化完成

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

    Permalink
  11. def clone(): AnyRef

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

    Permalink

    创建临时节点

    创建临时节点

    path

    目标路径

    data

    原始数据

    mode

    模式

    isPermanent

    永远跟踪

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

    Permalink

    创建临时节点

    创建临时节点

    path

    目标路径

    data

    原始数据

    mode

    模式

    isPermanent

    永远跟踪

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

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

    Permalink
    Definition Classes
    ZkPathCreatorSupport
  16. def debug(message: String, args: Any*): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LoggerSupport
  17. def delete(path: String): Unit

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  21. def error(message: String, e: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LoggerSupport
  22. def error(message: String, args: Any*): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LoggerSupport
  23. def finalize(): Unit

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

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

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

    Permalink

    获取节点数据

    获取节点数据

    path

    节点的路径

    stat

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

    returns

    节点数据

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

    Permalink

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

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

    path

    节点路径

    stat

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

    returns

    作为String返回节点的数据

    Definition Classes
    ZkNodeDataSupport
  28. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  29. def info(message: String, args: Any*): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LoggerSupport
  30. def internalCreatePath(path: String, data: Option[Array[Byte]] = None, createMode: CreateMode = CreateMode.PERSISTENT): Unit

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

    Permalink
    Definition Classes
    Any
  32. val logger: Logger

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

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

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

    Permalink
    Definition Classes
    AnyRef
  36. def recreateEphemeralNodes(): Unit

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    ZkNodeDataSupport
  40. def rewatchChildren(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    ZkChildrenSupport
  41. def rewatchNodeData(): Unit

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

    Permalink
    Definition Classes
    RunInNoExceptionThrown
  43. def serviceInitialized(): Unit

    Permalink

    标记服务已经初始化完毕

    标记服务已经初始化完毕

    Attributes
    protected
    Definition Classes
    ServiceWaitingInitSupport
  44. val sessionTimeout: Int

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

    Permalink

    设置某一节点的数据

    设置某一节点的数据

    path

    节点路径

    data

    节点数据

    stat

    节点的状态

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

    Permalink

    把字符串设置到某一节点

    把字符串设置到某一节点

    path

    节点路径

    data

    数据

    stat

    节点的状态信息

    encoding

    字符串的编码格式

    Definition Classes
    ZkNodeDataSupport
  47. def shutdown(): Unit

    Permalink

    关闭对象

    关闭对象

    Definition Classes
    ZkClientSupport
  48. def start(hub: RegistryShutdownHub): Unit

    Permalink

    启动对象实例

    启动对象实例

    Definition Classes
    ZkClientSupport
    Annotations
    @PostConstruct()
  49. def startCheckFailed(periodExecutor: PeriodicExecutor): Unit

    Permalink

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

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

    periodExecutor

    定时执行器

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

    Permalink

    得到某一节点信息

    得到某一节点信息

    path

    节点路径

    returns

    节点信息

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

    Permalink
    Definition Classes
    AnyRef
  52. def throwExceptionIfServiceInitialized(): Unit

    Permalink

    判断服务是否已经初始化

    判断服务是否已经初始化

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. def warn(message: String, args: Any*): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LoggerSupport
  58. def watchChildren(path: String, watcher: ChildrenDataWatcher): Unit

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

    Permalink

    watch某一节点数据

    watch某一节点数据

    path

    节点路径

    watcher

    节点watcher

    Definition Classes
    ZkNodeDataSupport
  60. def zkClient: CuratorFramework

    Permalink

    得到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 LoggerSupport

Inherited from ZkClientSupport

Inherited from ServiceWaitingInitSupport

Inherited from AnyRef

Inherited from Any

Ungrouped