Interface DatumQueue

All Known Implementing Classes:
DefaultDatumQueue

public interface DatumQueue
Unified queue to process datum across all of SolarNode.
Since:
1.89
Version:
2.0
Author:
matt
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    An Event topic for when a GeneralDatum has been acquired by a DatumQueue.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Register a consumer to receive processed datum.
    default boolean
    Offer a new datum to the queue, with persistence enabled.
    boolean
    offer(NodeDatum datum, boolean persist)
    Offer a new datum to the queue, optionally persisting.
    void
    De-register a previously registered consumer.
  • Field Details

    • EVENT_TOPIC_DATUM_ACQUIRED

      static final String EVENT_TOPIC_DATUM_ACQUIRED
      An Event topic for when a GeneralDatum has been acquired by a DatumQueue. This event happens after any possible queue filtering has been applied, which might filter out some of the datum offered to the queue or transform their contents. The DatumEvents.DATUM_PROPERTY property will be set to the datum instance that was acquired. In addition, the Datum.DATUM_TYPE_PROPERTY property shall be populated with the name of the core class name of the datum type.
      Since:
      2.0
      See Also:
  • Method Details

    • offer

      default boolean offer(NodeDatum datum)
      Offer a new datum to the queue, with persistence enabled.
      Parameters:
      datum - the datum to offer
      Returns:
      true if the datum was accepted
    • offer

      boolean offer(NodeDatum datum, boolean persist)
      Offer a new datum to the queue, optionally persisting.
      Parameters:
      datum - the datum to offer
      persist - true to persist, or false to only pass to consumers
      Returns:
      true if the datum was accepted
    • addConsumer

      void addConsumer(Consumer<NodeDatum> consumer)
      Register a consumer to receive processed datum.
      Parameters:
      consumer - the consumer to register
    • removeConsumer

      void removeConsumer(Consumer<NodeDatum> consumer)
      De-register a previously registered consumer.
      Parameters:
      consumer - the consumer to remove