ValueType
- The type of the value to wrappublic final class ParallelDataDrivenFuture<ValueType> extends ParallelFuture<ValueType> implements HjDataDrivenFuture<ValueType>
ParallelFuture.EventType, ParallelFuture.ExecutionState
HjFuture.CancelledException
activity
Modifier | Constructor and Description |
---|---|
protected |
ParallelDataDrivenFuture(boolean allowDuplicatePuts)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
cancel()
Attempts to cancel execution of this task.
|
static <ValueType> |
factory()
Factory method.
|
static <ValueType> |
factory(boolean allowDuplicatePuts)
Factory method.
|
ValueType |
get()
Returns the value wrapped in the futureNb.
|
ValueType |
safeGet()
Returns the value wrapped in the Future.
|
protected void |
throwPutFailedException(ValueType newValue)
throwPutFailedException.
|
attachListener, failed, failed, id, isCancelled, markStart, preReleaseCallback, put, resolved, retrieveValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
failed, put
protected ParallelDataDrivenFuture(boolean allowDuplicatePuts)
public static <ValueType> ParallelDataDrivenFuture<ValueType> factory()
ValueType
- The type of the value to wrappublic static <ValueType> ParallelDataDrivenFuture<ValueType> factory(boolean allowDuplicatePuts)
ValueType
- The type of the value to wrappublic ValueType get() throws SuspendableException
If the futureNb task has not completed as yet, the task performing the get() operation blocks until the result of the futureNb becomes available.
get
in interface HjDataDrivenFuture<ValueType>
get
in interface HjFuture<ValueType>
get
in class ParallelFuture<ValueType>
SuspendableException
public ValueType safeGet()
It is illegal to perform a safeGet() operation on an empty Future (i.e. one that has not yet been resolved).
safeGet
in interface HjDataDrivenFuture<ValueType>
safeGet
in interface HjFuture<ValueType>
safeGet
in class ParallelFuture<ValueType>
public boolean cancel()
cancel
in interface HjDataDrivenFuture<ValueType>
cancel
in interface HjFuture<ValueType>
cancel
in class ParallelFuture<ValueType>
protected void throwPutFailedException(ValueType newValue)
throwPutFailedException.
throwPutFailedException
in class ParallelFuture<ValueType>
newValue
- The value attempted to put into the futureNbCopyright © 2015 Rice University - Department of Computer Science. All rights reserved.