com.tibbo.aggregate.common.context

## Class EventData

- java.lang.Object
- - com.tibbo.aggregate.common.context.EventData

- All Implemented Interfaces:
    java.lang.Comparable<EventData>

      public class EventData
      extends java.lang.Object
      implements java.lang.Comparable<EventData>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `UNDISPATCHED_EVENTS_QUEUE_LENGTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EventData(EventDefinition definition, AbstractContext context)`
    `EventData(EventDefinition definition, ContextManager contextManager)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addListener(ContextEventListener listener, boolean weak)`
    `void` | `addListeners(ContextEventListenerSet targetListeners)`
    `void` | `clearListeners()`
    `int` | `compareTo(EventData d)`
    `boolean` | `contains(ContextEventListener listener)`
    `void` | `dispatch(Event event)`
    `void` | `dispatchAll(EventDispatcher ed)`
    `void` | `doWithListeners(java.util.function.Consumer<ContextEventListenerInfo> action)`
    `EventDefinition` | `getDefinition()`
    `java.util.concurrent.locks.ReentrantReadWriteLock` | `getDuplicateProcessingLock()`
    `long` | `getFireCount()`
    `long` | `getHandleExecutions()`
    `long` | `getHandleOffers()`
    `java.util.List<Event>` | `getHistory()`
    `long` | `getListenersCount()`
    `long` | `getQueueLength()`
    `long` | `getSubscribeCount()`
    `long` | `getUnsubscribeCount()`
    `boolean` | `hasListeners()`
    `boolean` | `isDispatching()`
    `void` | `queue(QueuedEvent ev)`
    `void` | `registerFiredEvent()`
    `void` | `registerHandleExecution()`
    `void` | `registerHandleOffer()`
    `boolean` | `removeListener(ContextEventListener listener)`
    `void` | `setDefinition(EventDefinition eventDefinition)`
    `void` | `setDispatching(boolean dispatching)`
    `boolean` | `shouldHandle(Event event)`
    `Event` | `store(Event event, java.lang.Integer customMemoryStorageSize)`
    `java.lang.String` | `toString()`
    `void` | `updateContext(java.lang.String oldPath, java.lang.String newPath)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### UNDISPATCHED_EVENTS_QUEUE_LENGTH

          public static final int UNDISPATCHED_EVENTS_QUEUE_LENGTH

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### EventData

          public EventData(EventDefinition definition,
                           ContextManager contextManager)

    - #### EventData

          public EventData(EventDefinition definition,
                           AbstractContext context)

  - ### Method Detail

    - #### registerFiredEvent

          public void registerFiredEvent()

    - #### registerHandleOffer

          public void registerHandleOffer()

    - #### registerHandleExecution

          public void registerHandleExecution()

    - #### getDefinition

          public EventDefinition getDefinition()

    - #### getFireCount

          public long getFireCount()

    - #### getDuplicateProcessingLock

          public java.util.concurrent.locks.ReentrantReadWriteLock getDuplicateProcessingLock()

    - #### addListener

          public boolean addListener(ContextEventListener listener,
                                     boolean weak)

    - #### removeListener

          public boolean removeListener(ContextEventListener listener)

    - #### clearListeners

          public void clearListeners()

    - #### hasListeners

          public boolean hasListeners()

    - #### dispatch

          public void dispatch(Event event)

    - #### store

          public Event store(Event event,
                             java.lang.Integer customMemoryStorageSize)

    - #### updateContext

          public void updateContext(java.lang.String oldPath,
                                    java.lang.String newPath)

    - #### getHistory

          public java.util.List<Event> getHistory()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### compareTo

          public int compareTo(EventData d)

      Specified by:
        `compareTo` in interface `java.lang.Comparable<EventData>`

    - #### queue

          public void queue(QueuedEvent ev)

    - #### dispatchAll

          public void dispatchAll(EventDispatcher ed)

    - #### isDispatching

          public boolean isDispatching()

    - #### setDispatching

          public void setDispatching(boolean dispatching)

    - #### setDefinition

          public void setDefinition(EventDefinition eventDefinition)

    - #### getHandleOffers

          public long getHandleOffers()

    - #### getHandleExecutions

          public long getHandleExecutions()

    - #### getListenersCount

          public long getListenersCount()

    - #### getSubscribeCount

          public long getSubscribeCount()

    - #### getUnsubscribeCount

          public long getUnsubscribeCount()

    - #### getQueueLength

          public long getQueueLength()

    - #### shouldHandle

          public boolean shouldHandle(Event event)

    - #### addListeners

          public void addListeners(ContextEventListenerSet targetListeners)

    - #### doWithListeners

          public void doWithListeners(java.util.function.Consumer<ContextEventListenerInfo> action)

    - #### contains

          public boolean contains(ContextEventListener listener)