public interface AsyncPrimitive extends DistributedPrimitive
DistributedPrimitive.StatusDEFAULT_OPERATION_TIMEOUT_MILLIS| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
close()
Closes the primitive.
|
default CompletableFuture<Void> |
destroy()
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.
|
addStatusChangeListener, name, primitiveType, removeStatusChangeListener, statusChangeListenersdefault CompletableFuture<Void> destroy()
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 completesCompletableFuture<Void> close()
SyncPrimitive sync()
SyncPrimitive sync(Duration operationTimeout)
operationTimeout - the synchronous operation timeoutCopyright © 2013–2018. All rights reserved.