public interface DistributedPrimitive
| Modifier and Type | Interface and Description |
|---|---|
static class |
DistributedPrimitive.Status
Status of distributed primitive.
|
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_OPERATION_TIMEOUT_MILLIS
Default timeout for primitive operations.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
addStatusChangeListener(Consumer<DistributedPrimitive.Status> listener)
Registers a listener to be called when the primitive's status changes.
|
String |
name()
Returns the name of this primitive.
|
PrimitiveType |
primitiveType()
Returns the type of primitive.
|
default void |
removeStatusChangeListener(Consumer<DistributedPrimitive.Status> listener)
Unregisters a previously registered listener to be called when the primitive's status changes.
|
default Collection<Consumer<DistributedPrimitive.Status>> |
statusChangeListeners()
Returns the collection of status change listeners previously registered.
|
static final long DEFAULT_OPERATION_TIMEOUT_MILLIS
String name()
PrimitiveType primitiveType()
default void addStatusChangeListener(Consumer<DistributedPrimitive.Status> listener)
listener - The listener to be called when the status changes.default void removeStatusChangeListener(Consumer<DistributedPrimitive.Status> listener)
listener - The listener to unregisterdefault Collection<Consumer<DistributedPrimitive.Status>> statusChangeListeners()
Copyright © 2013–2018. All rights reserved.