Class UnindexedEventTableImpl

java.lang.Object
com.espertech.esper.common.internal.epl.index.unindexed.UnindexedEventTable
com.espertech.esper.common.internal.epl.index.unindexed.UnindexedEventTableImpl
All Implemented Interfaces:
EventTable, Iterable<EventBean>

public class UnindexedEventTableImpl extends UnindexedEventTable
Simple table of events without an index.
  • Constructor Details

    • UnindexedEventTableImpl

      public UnindexedEventTableImpl(int streamNum)
      Ctor.
      Parameters:
      streamNum - is the indexed stream's number
  • Method Details

    • clear

      public void clear()
      Description copied from interface: EventTable
      Clear out index.
    • destroy

      public void destroy()
      Description copied from interface: EventTable
      Destroy index.
    • 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.

      Parameters:
      newData - to add
      oldData - to remove
      exprEvaluatorContext - evaluator context
    • add

      public void add(EventBean[] events, ExprEvaluatorContext exprEvaluatorContext)
      Description copied from interface: EventTable
      Add events to table.
      Parameters:
      events - to add
      exprEvaluatorContext - evaluator context
    • remove

      public void remove(EventBean[] events, ExprEvaluatorContext exprEvaluatorContext)
      Description copied from interface: EventTable
      Remove events from table.
      Parameters:
      events - to remove
      exprEvaluatorContext - evaluator context
    • add

      public void add(EventBean event, ExprEvaluatorContext exprEvaluatorContext)
      Description copied from interface: EventTable
      Add event to table.
      Parameters:
      event - to add
      exprEvaluatorContext - evaluator context
    • remove

      public void remove(EventBean event, ExprEvaluatorContext exprEvaluatorContext)
      Description copied from interface: EventTable
      Remove event from table.
      Parameters:
      event - to remove
      exprEvaluatorContext - evaluator context
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: EventTable
      Returns true if the index is definitely empty, or false if is not definitely empty but we can not certain.
      Returns:
      true for definitely empty index, false for there-may-be-rows and please-check-by-iterating
    • getEventSet

      public Set<EventBean> getEventSet()
      Returns events in table.
      Specified by:
      getEventSet in class UnindexedEventTable
      Returns:
      all events
    • iterator

      public Iterator<EventBean> iterator()
      Description copied from interface: EventTable
      Returns an iterator over events in the table. Not required to be implemented for all indexes. Full table scans and providers that have easy access to an iterator may implement.
      Returns:
      table iterator
    • getNumberOfEvents

      public Integer getNumberOfEvents()
      Description copied from interface: EventTable
      If the number of events is readily available, an implementation will return that number or it may return null to indicate that the count is not readily available.
      Returns:
      number of events
    • getIndex

      public Object getIndex()
      Description copied from interface: EventTable
      Return the index object itself, or an object-array for multiple index structures.

      May return null if the information is not readily available, i.e. externally maintained index

      Returns:
      index object
    • getProviderClass

      public Class getProviderClass()