public interface AsyncPrimitive extends DistributedPrimitive
DEFAULT_OPERATION_TIMEOUT_MILLIS| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
close()
Closes the primitive.
|
default CompletableFuture<Void> |
delete()
Purges state associated with this primitive.
|
SyncPrimitive |
sync()
Returns a synchronous wrapper around the asynchronous primitive.
|
SyncPrimitive |
sync(Duration operationTimeout)
Returns a synchronous wrapper around the asynchronous primitive.
|
addStateChangeListener, name, protocol, removeStateChangeListener, typeCompletableFuture<Void> close()
default CompletableFuture<Void> delete()
Implementations can override and provide appropriate clean up logic for purging any state state associated with the primitive. Whether modifications made within the destroy method have local or global visibility is left unspecified.
CompletableFuture that is completed when the operation completesSyncPrimitive sync()
SyncPrimitive sync(Duration operationTimeout)
operationTimeout - the synchronous operation timeoutCopyright © 2013–2018. All rights reserved.