public interface DistributedPrimitive
| 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 |
addStateChangeListener(Consumer<PrimitiveState> listener)
Registers a listener to be called when the primitive's state changes.
|
String |
name()
Returns the name of this primitive.
|
PrimitiveProtocol |
protocol()
Returns the primitive protocol.
|
default void |
removeStateChangeListener(Consumer<PrimitiveState> listener)
Unregisters a previously registered listener to be called when the primitive's state changes.
|
PrimitiveType |
type()
Returns the type of primitive.
|
static final long DEFAULT_OPERATION_TIMEOUT_MILLIS
String name()
PrimitiveType type()
PrimitiveProtocol protocol()
default void addStateChangeListener(Consumer<PrimitiveState> listener)
listener - The listener to be called when the state changes.default void removeStateChangeListener(Consumer<PrimitiveState> listener)
listener - The listener to unregisterCopyright © 2013–2018. All rights reserved.