Interface EventBundle

All Superinterfaces:
Iterable<Event>, Serializable
All Known Subinterfaces:
ReconnectedEventBundle
All Known Implementing Classes:
EventBundleImpl, ReconnectedEventBundleImpl

public interface EventBundle extends Iterable<Event>, Serializable
An ordered set of events raised during an user operation.

The bundle is used collects any events that is raised during an user operation. The bundle will be send after the operation commit to any registered PostCommitEventListener.

The bundle implementation is free to ignore some events. This is the case for events marked as inline or for duplicate events.

Author:
Bogdan Stefanescu
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Check is bundle contains the specified event.
    Gets the bundle name.
    Returns the VMID of the JVM where the bundle was created.
    boolean
    Tests whether or not this event bundle was created on a remote machine.
    boolean
    Tests whether or not this bundle is empty.
    Gets the first event in that bundle.
    void
    push(Event event)
    Adds an event in that bundle at the end of the list.
    int
    Gets the size of that bundle.

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Method Details

    • getName

      String getName()
      Gets the bundle name.

      This is usually the first event repository name in the bundle but the implementation may decide to change this behavior.

      Returns:
      the bundle name. Can be null only if the bundle is empty.
    • push

      void push(Event event)
      Adds an event in that bundle at the end of the list.

      The bundle implementation must ignore redundant events and events marked as inline.

      Parameters:
      event - the event to append.
    • peek

      Event peek()
      Gets the first event in that bundle.
      Returns:
      the first event. Can be null if the bundle is empty
    • isEmpty

      boolean isEmpty()
      Tests whether or not this bundle is empty.
    • size

      int size()
      Gets the size of that bundle.
      Returns:
      the number of events in that bundle
    • hasRemoteSource

      boolean hasRemoteSource()
      Tests whether or not this event bundle was created on a remote machine.
      Returns:
      true if the event bundle was fired from a remote machine, false otherwise
    • getSourceVMID

      VMID getSourceVMID()
      Returns the VMID of the JVM where the bundle was created.
    • containsEventName

      boolean containsEventName(String eventName)
      Check is bundle contains the specified event.