public class PartitionRuntime extends Object implements Snapshotable
| Constructor and Description |
|---|
PartitionRuntime(ConcurrentMap<String,org.wso2.siddhi.query.api.definition.AbstractDefinition> streamDefinitionMap,
ConcurrentMap<String,StreamJunction> streamJunctionMap,
org.wso2.siddhi.query.api.execution.partition.Partition partition,
SiddhiAppContext siddhiAppContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPartitionReceiver(QueryRuntime queryRuntime,
List<VariableExpressionExecutor> executors,
MetaStateEvent metaEvent) |
QueryRuntime |
addQuery(QueryRuntime metaQueryRuntime) |
void |
addStreamJunction(String key,
StreamJunction streamJunction) |
void |
cloneIfNotExist(String key)
clone all the queries of the partition for a given partition key if they are not available
|
Map<String,Object> |
currentState()
Used to collect the serializable state of the processing element, that need to be
persisted for the reconstructing the element to the same state on a different point of time
|
String |
getElementId() |
ConcurrentMap<String,org.wso2.siddhi.query.api.definition.AbstractDefinition> |
getLocalStreamDefinitionMap() |
ConcurrentMap<String,StreamJunction> |
getLocalStreamJunctionMap() |
ConcurrentMap<String,QueryRuntime> |
getMetaQueryRuntimeMap() |
String |
getPartitionId() |
void |
init() |
void |
restoreState(Map<String,Object> state)
Used to restore serialized state of the processing element, for reconstructing
the element to the same state as if was on a previous point of time.
|
void |
setMemoryUsageTracker(MemoryUsageTracker memoryUsageTracker) |
public PartitionRuntime(ConcurrentMap<String,org.wso2.siddhi.query.api.definition.AbstractDefinition> streamDefinitionMap, ConcurrentMap<String,StreamJunction> streamJunctionMap, org.wso2.siddhi.query.api.execution.partition.Partition partition, SiddhiAppContext siddhiAppContext)
public QueryRuntime addQuery(QueryRuntime metaQueryRuntime)
public void addPartitionReceiver(QueryRuntime queryRuntime, List<VariableExpressionExecutor> executors, MetaStateEvent metaEvent)
public void cloneIfNotExist(String key)
key - partition keypublic void addStreamJunction(String key, StreamJunction streamJunction)
public void init()
public String getPartitionId()
public ConcurrentMap<String,QueryRuntime> getMetaQueryRuntimeMap()
public ConcurrentMap<String,org.wso2.siddhi.query.api.definition.AbstractDefinition> getLocalStreamDefinitionMap()
public ConcurrentMap<String,StreamJunction> getLocalStreamJunctionMap()
public Map<String,Object> currentState()
SnapshotablecurrentState in interface Snapshotablepublic void restoreState(Map<String,Object> state)
SnapshotablerestoreState in interface Snapshotablestate - the stateful objects of the element as an array on
the same order provided by currentState().public String getElementId()
getElementId in interface Snapshotablepublic void setMemoryUsageTracker(MemoryUsageTracker memoryUsageTracker)
Copyright © 2017 WSO2. All rights reserved.