public class LocalStateHandle<T extends Serializable> extends Object implements StateHandle<T>
| Constructor and Description |
|---|
LocalStateHandle(T state) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
discardState()
Discards the state referred to by this handle, to free up resources in
the persistent storage.
|
T |
getState(ClassLoader userCodeClassLoader)
This retrieves and return the state represented by the handle.
|
long |
getStateSize()
Returns the size of the state in bytes.
|
public LocalStateHandle(T state)
public T getState(ClassLoader userCodeClassLoader)
StateHandlegetState in interface StateHandle<T extends Serializable>userCodeClassLoader - Class loader for deserializing user code specific classespublic void discardState()
StateObjectdiscardState in interface StateObjectpublic long getStateSize()
StateObjectIf the the size is not known, return 0.
getStateSize in interface StateObjectpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.