public class StateHandleStoreUtils extends Object
StateHandleStoreUtils collects utility methods that might be usefule for any StateHandleStore implementation.| Constructor and Description |
|---|
StateHandleStoreUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Serializable> |
deserialize(byte[] data)
Deserializes the passed data into a
RetrievableStateHandle. |
static byte[] |
serializeOrDiscard(StateObject stateObject)
Serializes the passed
StateObject and discards the state in case of failure. |
public static byte[] serializeOrDiscard(StateObject stateObject) throws Exception
StateObject and discards the state in case of failure.stateObject - the StateObject that shall be serialized.StateObject.Exception - if an error occurred during the serialization. The corresponding StateObject will be discarded in that case.public static <T extends Serializable> T deserialize(byte[] data) throws IOException, ClassNotFoundException
RetrievableStateHandle.T - The type of data handled by the deserialized RetrievableStateHandle.data - The data that shall be deserialized.RetrievableStateHandle instance.IOException - Any of the usual Input/Output related exceptions.ClassNotFoundException - If the data couldn't be deserialized into a RetrievableStateHandle referring to the expected type <T>.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.