public class SerializedFlowExecutionSnapshot extends FlowExecutionSnapshot implements java.io.Externalizable
SerializedFlowExecutionSnapshotFactory
.SerializedFlowExecutionSnapshotFactory
,
Serialized FormConstructor and Description |
---|
SerializedFlowExecutionSnapshot()
Default constructor necessary for
Externalizable custom serialization semantics. |
SerializedFlowExecutionSnapshot(FlowExecution flowExecution,
boolean compress)
Creates a new serialized flow execution snapshot.
|
Modifier and Type | Method and Description |
---|---|
protected byte[] |
compress(byte[] dataToCompress)
Internal helper method to compress given flow execution data using GZIP compression.
|
protected byte[] |
decompress(byte[] dataToDecompress)
Internal helper method to decompress given flow execution data using GZIP decompression.
|
protected FlowExecution |
deserialize(byte[] data,
java.lang.ClassLoader classLoader)
Internal helper method to deserialize given flow execution data.
|
boolean |
equals(java.lang.Object o) |
protected byte[] |
getFlowExecutionData()
Return the flow execution data in its raw byte[] form.
|
int |
hashCode() |
boolean |
isCompressed()
Returns whether or not the flow execution data in this snapshot is compressed.
|
void |
readExternal(java.io.ObjectInput in) |
protected byte[] |
serialize(FlowExecution flowExecution)
Internal helper method to serialize given flow execution.
|
FlowExecution |
unmarshal(java.lang.ClassLoader classLoader)
Unmarshal the flow execution from this snapshot's data.
|
void |
writeExternal(java.io.ObjectOutput out) |
public SerializedFlowExecutionSnapshot()
Externalizable
custom serialization semantics. Should not be called by
application code.public SerializedFlowExecutionSnapshot(FlowExecution flowExecution, boolean compress) throws SnapshotCreationException
flowExecution
- the flow executioncompress
- whether or not to apply compression during snapshottingSnapshotCreationException
public boolean isCompressed()
public FlowExecution unmarshal(java.lang.ClassLoader classLoader) throws SnapshotUnmarshalException
classLoader
- the classloader to use to resolve types during execution deserializationSnapshotUnmarshalException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
protected byte[] getFlowExecutionData() throws java.io.IOException
java.io.IOException
- a problem occured with decompressionprotected byte[] serialize(FlowExecution flowExecution) throws java.io.IOException
flowExecution
- flow execution to serializejava.io.IOException
- when something goes wrong during during serializationprotected FlowExecution deserialize(byte[] data, java.lang.ClassLoader classLoader) throws java.io.IOException, java.lang.ClassNotFoundException
data
- serialized flow flow execution dataclassLoader
- the class loader to use to resolve classes during deserializationjava.io.IOException
- when something goes wrong during deserializationjava.lang.ClassNotFoundException
- when required classes cannot be loadedprotected byte[] compress(byte[] dataToCompress) throws java.io.IOException
java.io.IOException
protected byte[] decompress(byte[] dataToDecompress) throws java.io.IOException
java.io.IOException