Class CompareCollectionExecutor
- java.lang.Object
-
- io.siddhi.core.util.collection.executor.CompareCollectionExecutor
-
- All Implemented Interfaces:
CollectionExecutor
public class CompareCollectionExecutor extends Object implements CollectionExecutor
Implementation ofCollectionExecutorwhich handle compare condition.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.siddhi.core.util.collection.executor.CollectionExecutor
CollectionExecutor.Cost
-
-
Field Summary
Fields Modifier and Type Field Description protected ExpressionExecutorexpressionExecutorprotected intstoreEventIndex
-
Constructor Summary
Constructors Constructor Description CompareCollectionExecutor(ExpressionExecutor expressionExecutor, int storeEventIndex, String attribute, io.siddhi.query.api.expression.condition.Compare.Operator operator, ExpressionExecutor valueExpressionExecutor, CacheTable cacheTable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(StateEvent matchingEvent, IndexedEventHolder indexedEventHolder)Checks if a matching event exist in indexedEventHoldervoiddelete(StateEvent deletingEvent, IndexedEventHolder indexedEventHolder)Delete matching events exists from indexedEventHolderStreamEventfind(StateEvent matchingEvent, IndexedEventHolder indexedEventHolder, StreamEventCloner storeEventCloner)Find the Events matching to the condition, used on the primary callCollection<StreamEvent>findEvents(StateEvent matchingEvent, IndexedEventHolder indexedEventHolder)Find the Events matching to the condition, used for consecutive calls from parent CollectionExecutorStringgetAttribute()CollectionExecutor.CostgetDefaultCost()ExpressionExecutorgetValueExpressionExecutor()
-
-
-
Field Detail
-
expressionExecutor
protected ExpressionExecutor expressionExecutor
-
storeEventIndex
protected int storeEventIndex
-
-
Constructor Detail
-
CompareCollectionExecutor
public CompareCollectionExecutor(ExpressionExecutor expressionExecutor, int storeEventIndex, String attribute, io.siddhi.query.api.expression.condition.Compare.Operator operator, ExpressionExecutor valueExpressionExecutor, CacheTable cacheTable)
-
-
Method Detail
-
find
public StreamEvent find(StateEvent matchingEvent, IndexedEventHolder indexedEventHolder, StreamEventCloner storeEventCloner)
Description copied from interface:CollectionExecutorFind the Events matching to the condition, used on the primary call- Specified by:
findin interfaceCollectionExecutor- Parameters:
matchingEvent- matching input eventindexedEventHolder- indexed EventHolder containing datastoreEventCloner- store event cloner- Returns:
- matched StreamEvent, null if no events matched. If storeEventCloner is null it will return the actual event references.
-
getValueExpressionExecutor
public ExpressionExecutor getValueExpressionExecutor()
-
findEvents
public Collection<StreamEvent> findEvents(StateEvent matchingEvent, IndexedEventHolder indexedEventHolder)
Description copied from interface:CollectionExecutorFind the Events matching to the condition, used for consecutive calls from parent CollectionExecutor- Specified by:
findEventsin interfaceCollectionExecutor- Parameters:
matchingEvent- matching input eventindexedEventHolder- indexed EventHolder containing data- Returns:
- matched events as Set, null if Exhaustive processing need to be done.
-
contains
public boolean contains(StateEvent matchingEvent, IndexedEventHolder indexedEventHolder)
Description copied from interface:CollectionExecutorChecks if a matching event exist in indexedEventHolder- Specified by:
containsin interfaceCollectionExecutor- Parameters:
matchingEvent- matching input eventindexedEventHolder- indexed EventHolder containing data- Returns:
- true if a matching event is available in indexedEventHolder else false
-
delete
public void delete(StateEvent deletingEvent, IndexedEventHolder indexedEventHolder)
Description copied from interface:CollectionExecutorDelete matching events exists from indexedEventHolder- Specified by:
deletein interfaceCollectionExecutor- Parameters:
deletingEvent- matching input eventindexedEventHolder- indexed EventHolder containing data
-
getDefaultCost
public CollectionExecutor.Cost getDefaultCost()
- Specified by:
getDefaultCostin interfaceCollectionExecutor
-
getAttribute
public String getAttribute()
-
-