public class SetDataBuilderImpl extends Object implements SetDataBuilder, ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat>
| Constructor and Description |
|---|
SetDataBuilderImpl(CuratorFrameworkImpl client,
Backgrounding backgrounding,
int version,
boolean compress) |
| Modifier and Type | Method and Description |
|---|---|
SetDataBackgroundVersionable |
compressed()
Cause the data to be compressed using the configured compression provider
|
org.apache.zookeeper.data.Stat |
forPath(String path)
Commit the currently building operation using the given path and the default data
for the client (usually a byte[0] unless changed via
CuratorFrameworkFactory.Builder#defaultData(byte[])). |
org.apache.zookeeper.data.Stat |
forPath(String path,
byte[] data)
Commit the currently building operation using the given path and data
|
ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat> |
inBackground()
Perform the action in the background
|
ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat> |
inBackground(BackgroundCallback callback)
Perform the action in the background
|
ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat> |
inBackground(BackgroundCallback callback,
Executor executor)
Perform the action in the background
|
ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat> |
inBackground(BackgroundCallback callback,
Object context)
Perform the action in the background
|
ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat> |
inBackground(BackgroundCallback callback,
Object context,
Executor executor)
Perform the action in the background
|
ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat> |
inBackground(Object context)
Perform the action in the background
|
void |
performBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<org.apache.curator.framework.imps.PathAndBytes> operationAndData) |
PathAndBytesable<org.apache.zookeeper.data.Stat> |
withUnhandledErrorListener(UnhandledErrorListener listener)
Set an error listener for this background operation.
|
BackgroundPathAndBytesable<org.apache.zookeeper.data.Stat> |
withVersion(int version)
Use the given version (the default is -1)
|
public SetDataBuilderImpl(CuratorFrameworkImpl client, Backgrounding backgrounding, int version, boolean compress)
public SetDataBackgroundVersionable compressed()
Compressiblecompressed in interface Compressible<SetDataBackgroundVersionable>public BackgroundPathAndBytesable<org.apache.zookeeper.data.Stat> withVersion(int version)
VersionablewithVersion in interface Versionable<BackgroundPathAndBytesable<org.apache.zookeeper.data.Stat>>version - version to usepublic ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat> inBackground(BackgroundCallback callback, Object context)
BackgroundableinBackground in interface Backgroundable<ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat>>callback - a functor that will get called when the operation has completedcontext - context object - will be available from the event sent to the listenerpublic ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat> inBackground(BackgroundCallback callback, Object context, Executor executor)
BackgroundableinBackground in interface Backgroundable<ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat>>callback - a functor that will get called when the operation has completedcontext - context object - will be available from the event sent to the listenerexecutor - executor to use for the background callpublic ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat> inBackground(BackgroundCallback callback)
BackgroundableinBackground in interface Backgroundable<ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat>>callback - a functor that will get called when the operation has completedpublic ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat> inBackground()
BackgroundableinBackground in interface Backgroundable<ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat>>public ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat> inBackground(Object context)
BackgroundableinBackground in interface Backgroundable<ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat>>context - context object - will be available from the event sent to the listenerpublic ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat> inBackground(BackgroundCallback callback, Executor executor)
BackgroundableinBackground in interface Backgroundable<ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat>>callback - a functor that will get called when the operation has completedexecutor - executor to use for the background callpublic PathAndBytesable<org.apache.zookeeper.data.Stat> withUnhandledErrorListener(UnhandledErrorListener listener)
ErrorListenerPathAndBytesablewithUnhandledErrorListener in interface ErrorListenerPathAndBytesable<org.apache.zookeeper.data.Stat>listener - the listenerpublic void performBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<org.apache.curator.framework.imps.PathAndBytes> operationAndData)
throws Exception
Exceptionpublic org.apache.zookeeper.data.Stat forPath(String path) throws Exception
PathAndBytesableCuratorFrameworkFactory.Builder#defaultData(byte[])).forPath in interface PathAndBytesable<org.apache.zookeeper.data.Stat>path - the pathException - errorspublic org.apache.zookeeper.data.Stat forPath(String path, byte[] data) throws Exception
PathAndBytesableforPath in interface PathAndBytesable<org.apache.zookeeper.data.Stat>path - the pathdata - the dataException - errorsCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.