Packages

p

csw.event.api

scaladsl

package scaladsl

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. trait EventPublisher extends AnyRef

    An EventPublisher interface to publish events.

    An EventPublisher interface to publish events. The published events are published on a key determined by csw.params.events.EventKey in the csw.params.events.Event model. This key can be used by the subscribers using csw.event.api.scaladsl.EventSubscriber interface to subscribe to the events.

  2. trait EventService extends AnyRef

    An interface to provide access to csw.event.api.scaladsl.EventPublisher and csw.event.api.scaladsl.EventSubscriber.

  3. trait EventSubscriber extends AnyRef

    An EventSubscriber interface to subscribe events.

    An EventSubscriber interface to subscribe events. The events can be subscribed on csw.params.events.EventKey. All events published on this key will be received by subscribers.

  4. trait EventSubscription extends AnyRef

    An interface to represent a subscription.

    An interface to represent a subscription. On subscribing to one or more Event Keys using the csw.event.api.scaladsl.EventSubscriber, the subscriber gets a handle to that particular subscription so as to perform some subscription specific tasks.

  5. sealed trait SubscriptionMode extends AnyRef

    The subscription mode is used to control the rate of events received by the subscriber.

    The subscription mode is used to control the rate of events received by the subscriber.

    Terminology:

    Tick: Refers to the exact clock tick Interval: Refers to the duration between two ticks

    Parameter mode can have two values -

    - SubscriptionModes.RateAdapterMode - SubscriptionModes.RateLimiterMode

    These two modes can be accessed in Java as:

    - SubscriptionModes.jRateAdapterMode - SubscriptionModes.jRateLimiterMode

    ---------------------------------------------------------------------------------------------------------------------
                       |                 Rate Adapter                  |                 Rate Limiter
    ---------------------------------------------------------------------------------------------------------------------
                       |                                               |
    1. Description     | Ensures that the subscriber will receive an   | Ensures that events will be delivered as soon
                       | event exactly at each tick.                   | as they are published along with the guarantee
                       |                                               | that no more than one event is delivered within
                       |                                               | a given interval.
                       |                                               |
    2. Fast Publisher  | The subscriber receives the most recently     | The subscriber receives the event as soon as it
                       | published event at each tick.                 | is published during the interval.
                       |                                               |
                       | Some events will be dropped because of the    | Some events will be dropped because of the
                       | guarantee that exactly one event is received  | guarantee that at most one event is received
                       | at each tick.                                 | within an interval.
                       |                                               |
    3. Slow Publisher  | The subscriber will get the last published    | The subscriber will not receive events at some
                       | event on each interval.                       | intervals.
                       |                                               |
                       | The subscriber will receive duplicate events  | The subscriber will never receive duplicate
                       | in case no element is published during that   | events.
                       | interval.                                     |
                       |                                               |
    4. Use cases       | The synchronized event stream received on     | When there is no strict requirement of
                       | subscription can be used as clock ticks by a  | synchronization of received events with the
                       | component to perform other arbitrary tasks.   | clock tick and minimum latency is required.
                       |                                               |
    5. Trade offs      | Latency of events received in this mode will  | The events received will not be in
                       | be more than that in                          | synchronization with the subscription frequency.
                       | [[SubscriptionModes.RateLimiterMode]].        |
                       |                                               | Some intervals might not receive an event.
                       |                                               |
                       |                                               | Duration observed between events received might
                       |                                               | not match with the specified subscription rate.
                       |                                               |

Value Members

  1. object SubscriptionModes

    List of supported Subscription Modes needed while subscribing to set of csw.params.events.EventKey.

    List of supported Subscription Modes needed while subscribing to set of csw.params.events.EventKey. Refer to documentation for csw.event.api.scaladsl.SubscriptionMode for more details.

Ungrouped