public class PropertyCompositeEventTableImpl extends PropertyCompositeEventTable
An alternative implementatation could have been based on "TreeMap<ComparableMultiKey, Set<EventBean>>>", however the following implication arrive - not applicable for range-only lookups (since there the key can be the value itself - not applicable for multiple nested range as ordering not nested - each add/remove and lookup would also need to construct a key object.
Modifier and Type | Field and Description |
---|---|
protected Map<Object,Object> |
index
Index table (sorted and/or keyed, always nested).
|
Constructor and Description |
---|
PropertyCompositeEventTableImpl(Class[] optKeyCoercedTypes,
Class[] optRangeCoercedTypes,
EventTableOrganization organization,
boolean isHashKeyed,
CompositeIndexEnterRemove chain) |
Modifier and Type | Method and Description |
---|---|
void |
add(EventBean theEvent,
ExprEvaluatorContext exprEvaluatorContext)
Add event to table.
|
void |
clear()
Clear out index.
|
void |
destroy()
Destroy index.
|
Map<Object,Object> |
getIndex()
Return the index object itself, or an object-array for multiple index structures.
|
int |
getNumKeys()
If the index retains events using some key-based organization this returns the number of keys,
and may return -1 to indicate that either the number of keys is not available or
costly to obtain.
|
CompositeIndexQueryResultPostProcessor |
getPostProcessor() |
Class |
getProviderClass() |
boolean |
isEmpty()
Returns true if the index is definitely empty,
or false if is not definitely empty but we can not certain.
|
Iterator<EventBean> |
iterator()
Returns an iterator over events in the table.
|
void |
remove(EventBean theEvent,
ExprEvaluatorContext exprEvaluatorContext)
Remove event from table.
|
add, addRemove, getNumberOfEvents, getOptKeyCoercedTypes, getOptRangeCoercedTypes, getOrganization, remove, toQueryPlan, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public PropertyCompositeEventTableImpl(Class[] optKeyCoercedTypes, Class[] optRangeCoercedTypes, EventTableOrganization organization, boolean isHashKeyed, CompositeIndexEnterRemove chain)
public Map<Object,Object> getIndex()
EventTable
May return null if the information is not readily available, i.e. externally maintained index
getIndex
in interface EventTable
getIndex
in class PropertyCompositeEventTable
public void add(EventBean theEvent, ExprEvaluatorContext exprEvaluatorContext)
EventTable
theEvent
- to addexprEvaluatorContext
- evaluator contextpublic void remove(EventBean theEvent, ExprEvaluatorContext exprEvaluatorContext)
EventTable
theEvent
- to removeexprEvaluatorContext
- evaluator contextpublic boolean isEmpty()
EventTable
public Iterator<EventBean> iterator()
EventTable
public void clear()
EventTable
public void destroy()
EventTable
public int getNumKeys()
EventTable
The number returned can be an estimate and may not be accurate.
public Class getProviderClass()
public CompositeIndexQueryResultPostProcessor getPostProcessor()
getPostProcessor
in class PropertyCompositeEventTable