public class SerializedFlowExecutionSnapshotFactory extends java.lang.Object implements FlowExecutionSnapshotFactory
Constructor and Description |
---|
SerializedFlowExecutionSnapshotFactory(FlowExecutionFactory flowExecutionFactory,
FlowDefinitionLocator flowDefinitionLocator)
Creates a new serialized flow execution snapshot factory
|
Modifier and Type | Method and Description |
---|---|
FlowExecutionSnapshot |
createSnapshot(FlowExecution flowExecution)
Takes a snapshot of the flow execution.
|
boolean |
getCompress()
Returns whether or not the snapshots should be compressed.
|
FlowExecution |
restoreExecution(FlowExecutionSnapshot snapshot,
java.lang.String flowId,
FlowExecutionKey key,
MutableAttributeMap<java.lang.Object> conversationScope,
FlowExecutionKeyFactory keyFactory)
Restores a flow execution from a previously taken snapshot.
|
void |
setCompress(boolean compress)
Set whether or not the snapshots should be compressed.
|
public SerializedFlowExecutionSnapshotFactory(FlowExecutionFactory flowExecutionFactory, FlowDefinitionLocator flowDefinitionLocator)
flowDefinitionLocator
- the flow definition locatorflowExecutionFactory
- the flow execution factorypublic boolean getCompress()
public void setCompress(boolean compress)
public FlowExecutionSnapshot createSnapshot(FlowExecution flowExecution) throws SnapshotCreationException
FlowExecutionSnapshotFactory
createSnapshot
in interface FlowExecutionSnapshotFactory
flowExecution
- the flow executionSnapshotCreationException
- if the snapshot could not be createdpublic FlowExecution restoreExecution(FlowExecutionSnapshot snapshot, java.lang.String flowId, FlowExecutionKey key, MutableAttributeMap<java.lang.Object> conversationScope, FlowExecutionKeyFactory keyFactory) throws FlowExecutionRestorationFailureException
FlowExecutionSnapshotFactory
restoreExecution
in interface FlowExecutionSnapshotFactory
snapshot
- the previously taken snapshotflowId
- the id of the root flow definitionkey
- the flow execution keyconversationScope
- conversation scopekeyFactory
- factory for creating new snapshot keysFlowExecutionRestorationFailureException
- if flow execution restoration fails