org.I0Itec.zkclient
Class ContentWatcher<T>
java.lang.Object
org.I0Itec.zkclient.ContentWatcher<T>
- Type Parameters:
T
- The data type that is being watched.
- All Implemented Interfaces:
- IZkDataListener
public final class ContentWatcher<T>
- extends java.lang.Object
- implements IZkDataListener
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContentWatcher
public ContentWatcher(ZkClient zkClient,
java.lang.String fileName)
start
public void start()
stop
public void stop()
setContent
public void setContent(T data)
handleDataChange
public void handleDataChange(java.lang.String dataPath,
java.lang.Object data)
- Specified by:
handleDataChange
in interface IZkDataListener
handleDataDeleted
public void handleDataDeleted(java.lang.String dataPath)
- Specified by:
handleDataDeleted
in interface IZkDataListener
getContent
public T getContent()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException