public class ZooKeeperClientService extends org.elasticsearch.common.component.AbstractLifecycleComponent<ZooKeeperClient> implements ZooKeeperClient
ZooKeeperClient.NodeListChangedListener, ZooKeeperClient.NodeListener, ZooKeeperClient.SessionStateListener| Constructor and Description |
|---|
ZooKeeperClientService(org.elasticsearch.common.settings.Settings settings,
ZooKeeperEnvironment environment,
ZooKeeperFactory zooKeeperFactory) |
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait@Inject
public ZooKeeperClientService(org.elasticsearch.common.settings.Settings settings,
ZooKeeperEnvironment environment,
ZooKeeperFactory zooKeeperFactory)
protected void doStart()
throws org.elasticsearch.ElasticsearchException
doStart in class org.elasticsearch.common.component.AbstractLifecycleComponent<ZooKeeperClient>org.elasticsearch.ElasticsearchExceptionprotected void doStop()
throws org.elasticsearch.ElasticsearchException
doStop in class org.elasticsearch.common.component.AbstractLifecycleComponent<ZooKeeperClient>org.elasticsearch.ElasticsearchExceptionprotected void doClose()
throws org.elasticsearch.ElasticsearchException
doClose in class org.elasticsearch.common.component.AbstractLifecycleComponent<ZooKeeperClient>org.elasticsearch.ElasticsearchExceptionpublic void createPersistentNode(String path) throws InterruptedException
createPersistentNode in interface ZooKeeperClientInterruptedExceptionpublic void setOrCreatePersistentNode(String path, byte[] data) throws InterruptedException
setOrCreatePersistentNode in interface ZooKeeperClientInterruptedExceptionpublic void setOrCreateTransientNode(String path, byte[] data) throws InterruptedException
setOrCreateTransientNode in interface ZooKeeperClientInterruptedExceptionpublic byte[] getOrCreateTransientNode(String path, byte[] data, ZooKeeperClient.NodeListener nodeListener) throws InterruptedException
getOrCreateTransientNode in interface ZooKeeperClientInterruptedExceptionpublic byte[] getNode(String path, ZooKeeperClient.NodeListener nodeListener) throws InterruptedException
getNode in interface ZooKeeperClientInterruptedExceptionpublic Set<String> listNodes(String path, ZooKeeperClient.NodeListChangedListener nodeListChangedListener) throws InterruptedException
listNodes in interface ZooKeeperClientInterruptedExceptionpublic void deleteNode(String path) throws InterruptedException
deleteNode in interface ZooKeeperClientInterruptedExceptionpublic void deleteNodeRecursively(String path) throws InterruptedException
deleteNodeRecursively in interface ZooKeeperClientInterruptedExceptionpublic String createLargeSequentialNode(String pathPrefix, byte[] data) throws InterruptedException
createLargeSequentialNode in interface ZooKeeperClientInterruptedExceptionpublic void deleteLargeNode(String path) throws InterruptedException
deleteLargeNode in interface ZooKeeperClientInterruptedExceptionpublic byte[] getLargeNode(String path) throws InterruptedException
getLargeNode in interface ZooKeeperClientInterruptedExceptionpublic void addSessionStateListener(ZooKeeperClient.SessionStateListener sessionStateListener)
addSessionStateListener in interface ZooKeeperClientpublic void removeSessionStateListener(ZooKeeperClient.SessionStateListener sessionStateListener)
removeSessionStateListener in interface ZooKeeperClientpublic boolean verifyConnection(org.elasticsearch.common.unit.TimeValue timeout)
throws InterruptedException
verifyConnection in interface ZooKeeperClientInterruptedExceptionpublic boolean connected()
connected in interface ZooKeeperClientpublic long sessionId()
sessionId in interface ZooKeeperClientCopyright © 2011–2014 JBoss by Red Hat. All rights reserved.