public abstract class ResultCache<T> extends Object implements Result<T>, Serializable
Constructor and Description |
---|
ResultCache() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isExecuted() |
T |
now()
Waits if necessary for the computation to complete, and then retrieves
its result.
|
protected abstract T |
nowUncached() |
protected void |
postExecuteHook()
Executed once after the cached value is assigned.
|
String |
toString()
We can get away with this because the subclass almost always provides concrete types
|
protected Object |
writeReplace()
When this serializes, write out a simple version that doesn't hold complicated links to internal
structures.
|
protected abstract T nowUncached()
protected boolean isExecuted()
public final T now()
Result
protected void postExecuteHook()
protected Object writeReplace() throws ObjectStreamException
ObjectStreamException
Copyright © 2016. All rights reserved.