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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(EventBean[] events, ExprEvaluatorContext exprEvaluatorContext) Add an array of events.void
addRemove
(EventBean[] newData, EventBean[] oldData, ExprEvaluatorContext exprEvaluatorContext) Add and remove events from table.protected Object
Determine multikey for index access.void
remove
(EventBean[] events, ExprEvaluatorContext exprEvaluatorContext) Remove events.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.espertech.esper.common.internal.epl.index.base.EventTable
add, clear, destroy, getIndex, getNumberOfEvents, getNumKeys, getProviderClass, isEmpty, iterator, remove
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
factory
-
-
Constructor Details
-
PropertyHashedEventTable
-
-
Method Details
-
lookup
-
lookupFAF
-
getKey
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 interfaceEventTable
- Parameters:
newData
- to addoldData
- to removeexprEvaluatorContext
- evaluator context
-
add
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 interfaceEventTable
- Parameters:
events
- to addexprEvaluatorContext
- evaluator context- Throws:
IllegalArgumentException
- if the event was already existed in the index
-
remove
Remove events.- Specified by:
remove
in interfaceEventTable
- 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
-
getOrganization
- Specified by:
getOrganization
in interfaceEventTable
-
toQueryPlan
- Specified by:
toQueryPlan
in interfaceEventTable
-
getMultiKeyTransform
-