Package io.siddhi.core.util.snapshot
Class SnapshotService
- java.lang.Object
-
- io.siddhi.core.util.snapshot.SnapshotService
-
public class SnapshotService extends Object
Service level implementation to take/restore snapshots of processing elements. Memory : PartitionId + QueryName + ElementId + PartitionGroupByKey + Item Snapshot : PartitionId + PartitionGroupByKey + QueryName + ElementId + Item
-
-
Constructor Summary
Constructors Constructor Description SnapshotService(SiddhiAppContext siddhiAppContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearAllRevisions()Clear all the revisions of persistence store of Siddhi Appbyte[]fullSnapshot()static ThreadLocal<Boolean>getSkipStateStorageThreadLocal()Map<String,StateHolder>getStateHolderMap(String partitionId, String queryName)ConcurrentHashMap<String,io.siddhi.core.util.snapshot.SnapshotService.PartitionIdStateHolder>getStates()IncrementalSnapshotincrementalSnapshot()Map<String,Object>queryState(String queryName)voidrestore(byte[] snapshot)voidrestore(Map<String,Map<String,Map<String,Map<Long,Map<IncrementalSnapshotInfo,byte[]>>>>> snapshot)StringrestoreLastRevision()voidrestoreRevision(String revision)
-
-
-
Constructor Detail
-
SnapshotService
public SnapshotService(SiddhiAppContext siddhiAppContext)
-
-
Method Detail
-
getSkipStateStorageThreadLocal
public static ThreadLocal<Boolean> getSkipStateStorageThreadLocal()
-
getStates
public ConcurrentHashMap<String,io.siddhi.core.util.snapshot.SnapshotService.PartitionIdStateHolder> getStates()
-
getStateHolderMap
public Map<String,StateHolder> getStateHolderMap(String partitionId, String queryName)
-
fullSnapshot
public byte[] fullSnapshot()
-
incrementalSnapshot
public IncrementalSnapshot incrementalSnapshot()
-
restore
public void restore(byte[] snapshot) throws CannotRestoreSiddhiAppStateException
-
restore
public void restore(Map<String,Map<String,Map<String,Map<Long,Map<IncrementalSnapshotInfo,byte[]>>>>> snapshot) throws CannotRestoreSiddhiAppStateException
-
restoreRevision
public void restoreRevision(String revision) throws CannotRestoreSiddhiAppStateException
-
restoreLastRevision
public String restoreLastRevision() throws CannotRestoreSiddhiAppStateException
-
clearAllRevisions
public void clearAllRevisions() throws CannotClearSiddhiAppStateExceptionClear all the revisions of persistence store of Siddhi App
-
-