public abstract class AsynchronousStateHandle<T> extends Object implements StateHandle<T>
StateHandle
that can asynchronously materialize the state that it represents. Instead
of representing a materialized handle to state this would normally hold the (immutable) state
internally and can materialize it if requested.Constructor and Description |
---|
AsynchronousStateHandle() |
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.
|
abstract StateHandle<T> |
materialize()
Materializes the state held by this
AsynchronousStateHandle . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getStateSize
public abstract StateHandle<T> materialize() throws Exception
AsynchronousStateHandle
.Exception
public final T getState(ClassLoader userCodeClassLoader) throws Exception
StateHandle
getState
in interface StateHandle<T>
userCodeClassLoader
- Class loader for deserializing user code specific classesException
- Thrown, if the state cannot be fetched.public final void discardState() throws Exception
StateHandle
discardState
in interface StateHandle<T>
Exception
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.