public final class CuratorFrameworkImpl extends CuratorFrameworkBase
| Modifier and Type | Field and Description |
|---|---|
UnhandledErrorListener |
debugUnhandledErrorListener |
| Constructor and Description |
|---|
CuratorFrameworkImpl(CuratorFrameworkFactory.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
void |
blockUntilConnected()
Block until a connection to ZooKeeper is available.
|
boolean |
blockUntilConnected(int maxWaitTime,
TimeUnit units)
Block until a connection to ZooKeeper is available or the maxWaitTime has been exceeded
|
void |
clearWatcherReferences(org.apache.zookeeper.Watcher watcher)
Curator can hold internal references to watchers that may inhibit garbage collection.
|
CuratorFramework |
client()
Return the underlying client which is the one constructed from
CuratorFrameworkFactory. |
void |
close()
Stop the client
|
boolean |
compressionEnabled()
Return whether compression is enabled by default for all create, setData and getData operations.
|
ConnectionStateErrorPolicy |
getConnectionStateErrorPolicy()
Return the configured error policy
|
Listenable<ConnectionStateListener> |
getConnectionStateListenable()
Returns the listenable interface for the Connect State
|
Listenable<CuratorListener> |
getCuratorListenable()
Returns the listenable interface for events
|
org.apache.zookeeper.server.quorum.flexible.QuorumVerifier |
getCurrentConfig()
Current maintains a cached view of the Zookeeper quorum config.
|
SchemaSet |
getSchemaSet()
Return this instance's schema set
|
CuratorFrameworkState |
getState()
Returns the state of this instance
|
Listenable<UnhandledErrorListener> |
getUnhandledErrorListenable()
Returns the listenable interface for unhandled errors
|
org.apache.curator.CuratorZookeeperClient |
getZookeeperClient()
Return the managed zookeeper client
|
org.apache.curator.utils.ZookeeperCompatibility |
getZookeeperCompatibility()
Return zookeeper server compatibility
|
boolean |
isStarted()
Deprecated.
|
org.apache.curator.utils.EnsurePath |
newNamespaceAwareEnsurePath(String path)
Allocates an ensure path instance that is namespace aware
|
CompletableFuture<Void> |
runSafe(Runnable runnable)
Curator (and user) recipes can use this to run notifyAll
and other blocking calls that might normally block ZooKeeper's event thread.
|
void |
start()
Start the client.
|
CuratorFramework |
usingNamespace(String newNamespace)
Returns a facade of the current instance that uses the specified namespace
or no namespace if
newNamespace is null. |
checkExists, checkState, create, createContainers, delete, getACL, getChildren, getConfig, getData, getNamespace, internalSync, inTransaction, newWatcherRemoveCuratorFramework, nonNamespaceView, reconfig, setACL, setData, sync, sync, transaction, transactionOp, watchers, watchesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpostSafeNotifypublic volatile UnhandledErrorListener debugUnhandledErrorListener
public CuratorFrameworkImpl(CuratorFrameworkFactory.Builder builder)
public CompletableFuture<Void> runSafe(Runnable runnable)
CuratorFrameworkrunnable - proc to call from a safe internal threadpublic org.apache.zookeeper.server.quorum.flexible.QuorumVerifier getCurrentConfig()
CuratorFrameworkpublic void clearWatcherReferences(org.apache.zookeeper.Watcher watcher)
CuratorFrameworkwatcher - the watcherpublic CuratorFramework client()
CuratorFrameworkBaseCuratorFrameworkFactory.client in class CuratorFrameworkBasepublic CuratorFrameworkState getState()
CuratorFramework@Deprecated public boolean isStarted()
CuratorFrameworkpublic boolean blockUntilConnected(int maxWaitTime,
TimeUnit units)
throws InterruptedException
CuratorFrameworkmaxWaitTime - The maximum wait time.
1. value <= 0 and units != null to return immediately;
2. value <= 0 and units == null to wait indefinitely,
which is same as CuratorFramework.blockUntilConnected().units - The time units for the maximum wait time.InterruptedException - If interrupted while waitingpublic void blockUntilConnected()
throws InterruptedException
CuratorFrameworkInterruptedException - If interrupted while waitingpublic ConnectionStateErrorPolicy getConnectionStateErrorPolicy()
CuratorFrameworkpublic void start()
CuratorFrameworkpublic void close()
CuratorFrameworkpublic CuratorFramework usingNamespace(String newNamespace)
CuratorFrameworknewNamespace is null.newNamespace - the new namespace or null for nonepublic Listenable<ConnectionStateListener> getConnectionStateListenable()
CuratorFrameworkpublic Listenable<CuratorListener> getCuratorListenable()
CuratorFrameworkpublic Listenable<UnhandledErrorListener> getUnhandledErrorListenable()
CuratorFrameworkpublic org.apache.curator.CuratorZookeeperClient getZookeeperClient()
CuratorFrameworkpublic org.apache.curator.utils.ZookeeperCompatibility getZookeeperCompatibility()
CuratorFrameworkpublic org.apache.curator.utils.EnsurePath newNamespaceAwareEnsurePath(String path)
CuratorFrameworknewNamespaceAwareEnsurePath in interface CuratorFrameworknewNamespaceAwareEnsurePath in class CuratorFrameworkBasepath - path to ensurepublic SchemaSet getSchemaSet()
CuratorFrameworkpublic boolean compressionEnabled()
CuratorFrameworkCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.