public abstract class Table extends Object implements FindableProcessor, MemoryCalculable
InMemoryTable
. Table
will support basic operations of add, delete, update, update or add and contains. *Modifier and Type | Field and Description |
---|---|
protected io.siddhi.query.api.definition.TableDefinition |
tableDefinition |
Constructor and Description |
---|
Table() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
add(ComplexEventChunk<StreamEvent> addingEventChunk) |
void |
addEvents(ComplexEventChunk<StreamEvent> addingEventChunk,
int noOfEvents) |
abstract CompiledUpdateSet |
compileUpdateSet(io.siddhi.query.api.execution.query.output.stream.UpdateSet updateSet,
MatchingMetaInfoHolder matchingMetaInfoHolder,
List<VariableExpressionExecutor> variableExpressionExecutors,
Map<String,Table> tableMap,
SiddhiQueryContext siddhiQueryContext)
Builds the "compiled" set clause of an update query.
|
protected abstract void |
connect() |
void |
connectWithRetry() |
protected abstract boolean |
contains(StateEvent matchingEvent,
CompiledCondition compiledCondition) |
boolean |
containsEvent(StateEvent matchingEvent,
CompiledCondition compiledCondition) |
protected abstract void |
delete(ComplexEventChunk<StateEvent> deletingEventChunk,
CompiledCondition compiledCondition) |
void |
deleteEvents(ComplexEventChunk<StateEvent> deletingEventChunk,
CompiledCondition compiledCondition,
int noOfEvents) |
protected abstract void |
destroy() |
protected abstract void |
disconnect() |
protected abstract StreamEvent |
find(CompiledCondition compiledCondition,
StateEvent matchingEvent) |
StreamEvent |
find(StateEvent matchingEvent,
CompiledCondition compiledCondition)
To find events from the processor event pool, that the matches the matchingEvent based on finder logic.
|
RecordTableHandler |
getHandler() |
io.siddhi.query.api.definition.TableDefinition |
getTableDefinition() |
protected abstract void |
init(io.siddhi.query.api.definition.TableDefinition tableDefinition,
StreamEventFactory storeEventPool,
StreamEventCloner storeEventCloner,
ConfigReader configReader,
SiddhiAppContext siddhiAppContext,
RecordTableHandler recordTableHandler) |
void |
initTable(io.siddhi.query.api.definition.TableDefinition tableDefinition,
StreamEventFactory storeEventPool,
StreamEventCloner storeEventCloner,
ConfigReader configReader,
SiddhiAppContext siddhiAppContext,
RecordTableHandler recordTableHandler) |
void |
shutdown() |
protected abstract void |
update(ComplexEventChunk<StateEvent> updatingEventChunk,
CompiledCondition compiledCondition,
CompiledUpdateSet compiledUpdateSet) |
void |
updateEvents(ComplexEventChunk<StateEvent> updatingEventChunk,
CompiledCondition compiledCondition,
CompiledUpdateSet compiledUpdateSet,
int noOfEvents) |
protected abstract void |
updateOrAdd(ComplexEventChunk<StateEvent> updateOrAddingEventChunk,
CompiledCondition compiledCondition,
CompiledUpdateSet compiledUpdateSet,
AddingStreamEventExtractor addingStreamEventExtractor) |
void |
updateOrAddEvents(ComplexEventChunk<StateEvent> updateOrAddingEventChunk,
CompiledCondition compiledCondition,
CompiledUpdateSet compiledUpdateSet,
AddingStreamEventExtractor addingStreamEventExtractor,
int noOfEvents) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compileCondition
protected io.siddhi.query.api.definition.TableDefinition tableDefinition
public void initTable(io.siddhi.query.api.definition.TableDefinition tableDefinition, StreamEventFactory storeEventPool, StreamEventCloner storeEventCloner, ConfigReader configReader, SiddhiAppContext siddhiAppContext, RecordTableHandler recordTableHandler)
protected abstract void init(io.siddhi.query.api.definition.TableDefinition tableDefinition, StreamEventFactory storeEventPool, StreamEventCloner storeEventCloner, ConfigReader configReader, SiddhiAppContext siddhiAppContext, RecordTableHandler recordTableHandler)
public io.siddhi.query.api.definition.TableDefinition getTableDefinition()
public void addEvents(ComplexEventChunk<StreamEvent> addingEventChunk, int noOfEvents)
protected abstract void add(ComplexEventChunk<StreamEvent> addingEventChunk) throws ConnectionUnavailableException
ConnectionUnavailableException
public StreamEvent find(StateEvent matchingEvent, CompiledCondition compiledCondition)
FindableProcessor
find
in interface FindableProcessor
matchingEvent
- the event to be matched with the events at the processorcompiledCondition
- the execution element responsible for matching the corresponding events that matches
the matchingEvent based on pool of events at Processorprotected abstract StreamEvent find(CompiledCondition compiledCondition, StateEvent matchingEvent) throws ConnectionUnavailableException
ConnectionUnavailableException
public void deleteEvents(ComplexEventChunk<StateEvent> deletingEventChunk, CompiledCondition compiledCondition, int noOfEvents)
protected abstract void delete(ComplexEventChunk<StateEvent> deletingEventChunk, CompiledCondition compiledCondition) throws ConnectionUnavailableException
ConnectionUnavailableException
public void updateEvents(ComplexEventChunk<StateEvent> updatingEventChunk, CompiledCondition compiledCondition, CompiledUpdateSet compiledUpdateSet, int noOfEvents)
protected abstract void update(ComplexEventChunk<StateEvent> updatingEventChunk, CompiledCondition compiledCondition, CompiledUpdateSet compiledUpdateSet) throws ConnectionUnavailableException
ConnectionUnavailableException
public void updateOrAddEvents(ComplexEventChunk<StateEvent> updateOrAddingEventChunk, CompiledCondition compiledCondition, CompiledUpdateSet compiledUpdateSet, AddingStreamEventExtractor addingStreamEventExtractor, int noOfEvents)
protected abstract void updateOrAdd(ComplexEventChunk<StateEvent> updateOrAddingEventChunk, CompiledCondition compiledCondition, CompiledUpdateSet compiledUpdateSet, AddingStreamEventExtractor addingStreamEventExtractor) throws ConnectionUnavailableException
ConnectionUnavailableException
public boolean containsEvent(StateEvent matchingEvent, CompiledCondition compiledCondition)
protected abstract boolean contains(StateEvent matchingEvent, CompiledCondition compiledCondition) throws ConnectionUnavailableException
ConnectionUnavailableException
public void connectWithRetry()
public abstract CompiledUpdateSet compileUpdateSet(io.siddhi.query.api.execution.query.output.stream.UpdateSet updateSet, MatchingMetaInfoHolder matchingMetaInfoHolder, List<VariableExpressionExecutor> variableExpressionExecutors, Map<String,Table> tableMap, SiddhiQueryContext siddhiQueryContext)
updateSet
- the set of assignment expressions, each containing the table column to be
updated and the expression to be assigned.matchingMetaInfoHolder
- the meta structure of the incoming matchingEventvariableExpressionExecutors
- the list of variable ExpressionExecutors already createdtableMap
- map of event tablessiddhiQueryContext
- current siddhi query contextprotected abstract void connect() throws ConnectionUnavailableException
ConnectionUnavailableException
protected abstract void disconnect()
protected abstract void destroy()
public RecordTableHandler getHandler()
public void shutdown()
Copyright © 2019. All rights reserved.