V - value typepublic interface DistributedValue<V> extends SyncPrimitive
DEFAULT_OPERATION_TIMEOUT_MILLIS| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ValueEventListener<V> listener)
Registers the specified listener to be notified whenever the atomic value is updated.
|
AsyncDistributedValue<V> |
async()
Returns the underlying asynchronous primitive.
|
V |
get()
Gets the current value.
|
V |
getAndSet(V value)
Atomically sets to the given value and returns the old value.
|
void |
removeListener(ValueEventListener<V> listener)
Unregisters the specified listener such that it will no longer
receive atomic value update notifications.
|
void |
set(V value)
Sets to the given value.
|
close, deleteaddStateChangeListener, name, protocol, removeStateChangeListener, typeV get()
V getAndSet(V value)
value - the new valuevoid set(V value)
value - new valuevoid addListener(ValueEventListener<V> listener)
listener - listener to notify about eventsvoid removeListener(ValueEventListener<V> listener)
listener - listener to unregisterAsyncDistributedValue<V> async()
SyncPrimitiveasync in interface SyncPrimitiveCopyright © 2013–2018. All rights reserved.