public class LocalStateHandle<T extends Serializable> extends Object implements StateHandle<T>
Constructor and Description |
---|
LocalStateHandle(T state) |
Modifier and Type | Method and Description |
---|---|
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)
StateHandle
getState
in interface StateHandle<T extends Serializable>
userCodeClassLoader
- Class loader for deserializing user code specific classespublic void discardState()
StateHandle
discardState
in interface StateHandle<T extends Serializable>
public long getStateSize()
StateHandle
If the the size is not known, return 0
.
getStateSize
in interface StateHandle<T extends Serializable>
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.