Interface DistributedPrimitive

All Known Subinterfaces:
AsyncPrimitive, SyncPrimitive
All Known Implementing Classes:
AbstractAsyncPrimitive, Synchronous

public interface DistributedPrimitive
Interface for all distributed primitives.
  • Field Details

  • Method Details

    • name

      String name()
      Returns the name of this primitive.
      Returns:
      name
    • type

      Returns the type of primitive.
      Returns:
      primitive type
    • protocol

      PrimitiveProtocol protocol()
      Returns the primitive protocol.
      Returns:
      the primitive protocol
    • addStateChangeListener

      default void addStateChangeListener​(java.util.function.Consumer<PrimitiveState> listener)
      Registers a listener to be called when the primitive's state changes.
      Parameters:
      listener - The listener to be called when the state changes.
    • removeStateChangeListener

      default void removeStateChangeListener​(java.util.function.Consumer<PrimitiveState> listener)
      Unregisters a previously registered listener to be called when the primitive's state changes.
      Parameters:
      listener - The listener to unregister