@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, registerCloseable
public ByteStreamStateHandle(byte[] data)
data
- The state data.public InputStream getState(ClassLoader userCodeClassLoader) throws Exception
StateHandle
getState
in interface StateHandle<InputStream>
userCodeClassLoader
- Class loader for deserializing user code specific classesException
- Thrown, if the state cannot be fetched.public void discardState()
StateObject
discardState
in interface StateObject
public long getStateSize()
StateObject
If the the size is not known, return 0
.
getStateSize
in interface StateObject
public <T extends Serializable> StateHandle<T> toSerializableHandle()
StreamStateHandle
toSerializableHandle
in interface StreamStateHandle
public byte[] getData()
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.