Class PropertyHashedEventTable

java.lang.Object
com.espertech.esper.common.internal.epl.index.hash.PropertyHashedEventTable
All Implemented Interfaces:
EventTable, Iterable<EventBean>
Direct Known Subclasses:
PropertyHashedEventTableUnadorned, PropertyHashedEventTableUnique

public abstract class PropertyHashedEventTable extends Object implements EventTable
  • Field Details

  • Constructor Details

  • Method Details

    • lookup

      public abstract Set<EventBean> lookup(Object key)
    • lookupFAF

      public abstract Set<EventBean> lookupFAF(Object key)
    • getKey

      protected Object getKey(EventBean theEvent)
      Determine multikey for index access.
      Parameters:
      theEvent - to get properties from for key
      Returns:
      multi key
    • addRemove

      public void addRemove(EventBean[] newData, EventBean[] oldData, ExprEvaluatorContext exprEvaluatorContext)
      Description copied from interface: EventTable
      Add and remove events from table.

      It is up to the index to decide whether to add first and then remove, or whether to remove and then add.

      It is important to note that a given event can be in both the removed and the added events. This means that unique indexes probably need to remove first and then add. Most other non-unique indexes will add first and then remove since the an event can be both in the add and the remove stream.

      Specified by:
      addRemove in interface EventTable
      Parameters:
      newData - to add
      oldData - to remove
      exprEvaluatorContext - evaluator context
    • add

      public void add(EventBean[] events, ExprEvaluatorContext exprEvaluatorContext)
      Add an array of events. Same event instance is not added twice. Event properties should be immutable. Allow null passed instead of an empty array.
      Specified by:
      add in interface EventTable
      Parameters:
      events - to add
      exprEvaluatorContext - evaluator context
      Throws:
      IllegalArgumentException - if the event was already existed in the index
    • remove

      public void remove(EventBean[] events, ExprEvaluatorContext exprEvaluatorContext)
      Remove events.
      Specified by:
      remove in interface EventTable
      Parameters:
      events - to be removed, can be null instead of an empty array.
      exprEvaluatorContext - evaluator context
      Throws:
      IllegalArgumentException - when the event could not be removed as its not in the index
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getOrganization

      public EventTableOrganization getOrganization()
      Specified by:
      getOrganization in interface EventTable
    • toQueryPlan

      public String toQueryPlan()
      Specified by:
      toQueryPlan in interface EventTable
    • getMultiKeyTransform

      public MultiKeyFromObjectArray getMultiKeyTransform()