Package io.siddhi.core.table.record
Class RecordTableHandler<S extends State>
- java.lang.Object
-
- io.siddhi.core.table.record.RecordTableHandler<S>
-
-
Constructor Summary
Constructors Constructor Description RecordTableHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadd(long timestamp, List<Object[]> records)abstract voidadd(long timestamp, List<Object[]> records, RecordTableHandlerCallback recordTableHandlerCallback, S state)booleancontains(long timestamp, Map<String,Object> containsConditionParameterMap, CompiledCondition compiledCondition)abstract booleancontains(long timestamp, Map<String,Object> containsConditionParameterMap, CompiledCondition compiledCondition, RecordTableHandlerCallback recordTableHandlerCallback, S state)voiddelete(long timestamp, List<Map<String,Object>> deleteConditionParameterMaps, CompiledCondition compiledCondition)abstract voiddelete(long timestamp, List<Map<String,Object>> deleteConditionParameterMaps, CompiledCondition compiledCondition, RecordTableHandlerCallback recordTableHandlerCallback, S state)Iterator<Object[]>find(long timestamp, Map<String,Object> findConditionParameterMap, CompiledCondition compiledCondition)abstract Iterator<Object[]>find(long timestamp, Map<String,Object> findConditionParameterMap, CompiledCondition compiledCondition, RecordTableHandlerCallback recordTableHandlerCallback, S state)StringgetId()protected voidinit(io.siddhi.query.api.definition.TableDefinition tableDefinition, RecordTableHandlerCallback recordTableHandlerCallback, SiddhiAppContext siddhiAppContext)abstract StateFactory<S>init(String id, io.siddhi.query.api.definition.TableDefinition tableDefinition)Initialize the Record Table HandlerIterator<Object[]>query(long timestamp, Map<String,Object> parameterMap, CompiledCondition compiledCondition, CompiledSelection compiledSelection)Deprecated.abstract Iterator<Object[]>query(long timestamp, Map<String,Object> parameterMap, CompiledCondition compiledCondition, CompiledSelection compiledSelection, RecordTableHandlerCallback recordTableHandlerCallback, S state)Deprecated.Iterator<Object[]>query(long timestamp, Map<String,Object> parameterMap, CompiledCondition compiledCondition, CompiledSelection compiledSelection, io.siddhi.query.api.definition.Attribute[] outputAttributes)abstract Iterator<Object[]>query(long timestamp, Map<String,Object> parameterMap, CompiledCondition compiledCondition, CompiledSelection compiledSelection, io.siddhi.query.api.definition.Attribute[] outputAttributes, RecordTableHandlerCallback recordTableHandlerCallback, S state)voidupdate(long timestamp, CompiledCondition compiledCondition, List<Map<String,Object>> updateConditionParameterMaps, LinkedHashMap<String,CompiledExpression> updateSetMap, List<Map<String,Object>> updateSetParameterMaps)abstract voidupdate(long timestamp, CompiledCondition updateCondition, List<Map<String,Object>> updateConditionParameterMaps, LinkedHashMap<String,CompiledExpression> updateSetExpressions, List<Map<String,Object>> updateSetParameterMaps, RecordTableHandlerCallback recordTableHandlerCallback, S state)voidupdateOrAdd(long timestamp, CompiledCondition compiledCondition, List<Map<String,Object>> updateConditionParameterMaps, LinkedHashMap<String,CompiledExpression> updateSetMap, List<Map<String,Object>> updateSetParameterMaps, List<Object[]> addingRecords)abstract voidupdateOrAdd(long timestamp, CompiledCondition updateCondition, List<Map<String,Object>> updateConditionParameterMaps, LinkedHashMap<String,CompiledExpression> updateSetExpressions, List<Map<String,Object>> updateSetParameterMaps, List<Object[]> addingRecords, RecordTableHandlerCallback recordTableHandlerCallback)
-
-
-
Method Detail
-
init
protected final void init(io.siddhi.query.api.definition.TableDefinition tableDefinition, RecordTableHandlerCallback recordTableHandlerCallback, SiddhiAppContext siddhiAppContext)
-
getId
public String getId()
-
init
public abstract StateFactory<S> init(String id, io.siddhi.query.api.definition.TableDefinition tableDefinition)
Initialize the Record Table Handler- Parameters:
id- is the generated id for the record table handlertableDefinition- is the definition of the table with annotations if any
-
add
public void add(long timestamp, List<Object[]> records) throws ConnectionUnavailableException- Throws:
ConnectionUnavailableException
-
add
public abstract void add(long timestamp, List<Object[]> records, RecordTableHandlerCallback recordTableHandlerCallback, S state) throws ConnectionUnavailableException- Parameters:
timestamp- the timestamp of the last event in the event chunkrecords- records that need to be added to the table, each Object[] represent a record and it will match the attributes of the Table Definition.recordTableHandlerCallback- call back to do operations on the record tablestate- current state- Throws:
ConnectionUnavailableException
-
delete
public void delete(long timestamp, List<Map<String,Object>> deleteConditionParameterMaps, CompiledCondition compiledCondition) throws ConnectionUnavailableException- Throws:
ConnectionUnavailableException
-
delete
public abstract void delete(long timestamp, List<Map<String,Object>> deleteConditionParameterMaps, CompiledCondition compiledCondition, RecordTableHandlerCallback recordTableHandlerCallback, S state) throws ConnectionUnavailableException- Parameters:
timestamp- the timestamp of the last event in the event chunkdeleteConditionParameterMaps- map of matching StreamVariable Ids and their values corresponding to the compiled conditioncompiledCondition- the compiledCondition against which records should be matched for deletionrecordTableHandlerCallback- call back to do operations on the record tablestate- current state- Throws:
ConnectionUnavailableException
-
update
public void update(long timestamp, CompiledCondition compiledCondition, List<Map<String,Object>> updateConditionParameterMaps, LinkedHashMap<String,CompiledExpression> updateSetMap, List<Map<String,Object>> updateSetParameterMaps) throws ConnectionUnavailableException- Throws:
ConnectionUnavailableException
-
update
public abstract void update(long timestamp, CompiledCondition updateCondition, List<Map<String,Object>> updateConditionParameterMaps, LinkedHashMap<String,CompiledExpression> updateSetExpressions, List<Map<String,Object>> updateSetParameterMaps, RecordTableHandlerCallback recordTableHandlerCallback, S state) throws ConnectionUnavailableException- Parameters:
timestamp- the timestamp of the last event in the event chunkupdateCondition- the compiledCondition against which records should be matched for updateupdateConditionParameterMaps- map of matching StreamVariable Ids and their values corresponding to the compiled condition based on which the records will be updatedupdateSetExpressions- the set of updates mappings and related complied expressionsupdateSetParameterMaps- map of matching StreamVariable Ids and their values corresponding to therecordTableHandlerCallback- call back to do operations on the record tablestate- current state- Throws:
ConnectionUnavailableException
-
updateOrAdd
public void updateOrAdd(long timestamp, CompiledCondition compiledCondition, List<Map<String,Object>> updateConditionParameterMaps, LinkedHashMap<String,CompiledExpression> updateSetMap, List<Map<String,Object>> updateSetParameterMaps, List<Object[]> addingRecords) throws ConnectionUnavailableException- Throws:
ConnectionUnavailableException
-
updateOrAdd
public abstract void updateOrAdd(long timestamp, CompiledCondition updateCondition, List<Map<String,Object>> updateConditionParameterMaps, LinkedHashMap<String,CompiledExpression> updateSetExpressions, List<Map<String,Object>> updateSetParameterMaps, List<Object[]> addingRecords, RecordTableHandlerCallback recordTableHandlerCallback) throws ConnectionUnavailableException- Parameters:
timestamp- the timestamp of the last event in the event chunkupdateCondition- the compiledCondition against which records should be matched for updateupdateConditionParameterMaps- map of matching StreamVariable Ids and their values corresponding to the compiled condition based on which the records will be updatedupdateSetExpressions- the set of updates mappings and related complied expressionsupdateSetParameterMaps- map of matching StreamVariable Ids and their values corresponding to the update setaddingRecords- the values for adding new records if the update condition did not matchrecordTableHandlerCallback- call back to do operations on the record table- Throws:
ConnectionUnavailableException
-
find
public Iterator<Object[]> find(long timestamp, Map<String,Object> findConditionParameterMap, CompiledCondition compiledCondition) throws ConnectionUnavailableException
- Throws:
ConnectionUnavailableException
-
find
public abstract Iterator<Object[]> find(long timestamp, Map<String,Object> findConditionParameterMap, CompiledCondition compiledCondition, RecordTableHandlerCallback recordTableHandlerCallback, S state) throws ConnectionUnavailableException
- Parameters:
timestamp- the timestamp of the event used to match from record tablefindConditionParameterMap- map of matching StreamVariable Ids and their values corresponding to the compiled conditioncompiledCondition- the compiledCondition against which records should be matchedrecordTableHandlerCallback- call back to do operations on the record tablestate-- Returns:
- RecordIterator of matching records
- Throws:
ConnectionUnavailableException
-
contains
public boolean contains(long timestamp, Map<String,Object> containsConditionParameterMap, CompiledCondition compiledCondition) throws ConnectionUnavailableException- Throws:
ConnectionUnavailableException
-
contains
public abstract boolean contains(long timestamp, Map<String,Object> containsConditionParameterMap, CompiledCondition compiledCondition, RecordTableHandlerCallback recordTableHandlerCallback, S state) throws ConnectionUnavailableException- Parameters:
timestamp- the timestamp of the event used to match from record tablecontainsConditionParameterMap- map of matching StreamVariable Ids and their values corresponding to the compiled conditioncompiledCondition- the compiledCondition against which records should be matchedrecordTableHandlerCallback- call back to do operations on the record tablestate- current state- Returns:
- if matching record found or not
- Throws:
ConnectionUnavailableException
-
query
@Deprecated public Iterator<Object[]> query(long timestamp, Map<String,Object> parameterMap, CompiledCondition compiledCondition, CompiledSelection compiledSelection) throws ConnectionUnavailableException
Deprecated.- Throws:
ConnectionUnavailableException
-
query
public Iterator<Object[]> query(long timestamp, Map<String,Object> parameterMap, CompiledCondition compiledCondition, CompiledSelection compiledSelection, io.siddhi.query.api.definition.Attribute[] outputAttributes) throws ConnectionUnavailableException
- Throws:
ConnectionUnavailableException
-
query
@Deprecated public abstract Iterator<Object[]> query(long timestamp, Map<String,Object> parameterMap, CompiledCondition compiledCondition, CompiledSelection compiledSelection, RecordTableHandlerCallback recordTableHandlerCallback, S state) throws ConnectionUnavailableException
Deprecated.- Parameters:
timestamp- the timestamp of the event used to match from record tableparameterMap- map of matching StreamVariable Ids and their values corresponding to the compiled condition and selectioncompiledCondition- the compiledCondition against which records should be matchedcompiledSelection- the compiledSelection which maps the events based on selectionrecordTableHandlerCallback- call back to do operations on the record tablestate- current state- Returns:
- RecordIterator of matching records
- Throws:
ConnectionUnavailableException
-
query
public abstract Iterator<Object[]> query(long timestamp, Map<String,Object> parameterMap, CompiledCondition compiledCondition, CompiledSelection compiledSelection, io.siddhi.query.api.definition.Attribute[] outputAttributes, RecordTableHandlerCallback recordTableHandlerCallback, S state) throws ConnectionUnavailableException
- Throws:
ConnectionUnavailableException
-
-