@Deprecated public final class ByteStreamStateHandle extends AbstractCloseableHandle implements StreamStateHandle
| Constructor and Description |
|---|
ByteStreamStateHandle(byte[] data)
Deprecated.
Creates a new ByteStreamStateHandle containing the given data.
|
| Modifier and Type | Method and Description |
|---|---|
void |
discardState()
Deprecated.
Discards the state referred to by this handle, to free up resources in
the persistent storage.
|
byte[] |
getData()
Deprecated.
|
InputStream |
getState(ClassLoader userCodeClassLoader)
Deprecated.
This retrieves and return the state represented by the handle.
|
long |
getStateSize()
Deprecated.
Returns the size of the state in bytes.
|
<T extends Serializable> |
toSerializableHandle()
Deprecated.
Converts this stream state handle into a state handle that de-serializes
the stream into an object using Java's serialization mechanism.
|
close, ensureNotClosed, isClosed, registerCloseablepublic ByteStreamStateHandle(byte[] data)
data - The state data.public InputStream getState(ClassLoader userCodeClassLoader) throws Exception
StateHandlegetState in interface StateHandle<InputStream>userCodeClassLoader - Class loader for deserializing user code specific classesException - Thrown, if the state cannot be fetched.public void discardState()
StateObjectdiscardState in interface StateObjectpublic long getStateSize()
StateObjectIf the the size is not known, return 0.
getStateSize in interface StateObjectpublic <T extends Serializable> StateHandle<T> toSerializableHandle()
StreamStateHandletoSerializableHandle in interface StreamStateHandlepublic byte[] getData()
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.