net.tomp2p.futures
Class FutureForkJoin<K extends BaseFuture>
java.lang.Object
net.tomp2p.futures.BaseFutureImpl
net.tomp2p.futures.FutureForkJoin<K>
- All Implemented Interfaces:
- BaseFuture, Cancellable
- Direct Known Subclasses:
- FutureForkedBroadcast
public class FutureForkJoin<K extends BaseFuture>
- extends BaseFutureImpl
- implements BaseFuture
| Methods inherited from class net.tomp2p.futures.BaseFutureImpl |
addCancellation, addListener, await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, getType, isCompleted, isFailed, isSuccess, notifyListerenrs, removeCancellation, removeListener, setCompletedAndNotify, setFailed |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.tomp2p.futures.BaseFuture |
addCancellation, addListener, await, await, awaitUninterruptibly, awaitUninterruptibly, getType, isCompleted, isFailed, isSuccess, removeCancellation, removeListener, setFailed |
FutureForkJoin
public FutureForkJoin(K... forks)
FutureForkJoin
public FutureForkJoin(int nrFinishFuturesSuccess,
boolean cancelFuturesOnFinish,
K... forks)
- Parameters:
futureNr - Is the number of non-null futures. Its fail fast.nrFinishFuturesSuccess - forks -
getFailedReason
public String getFailedReason()
- Description copied from interface:
BaseFuture
- The default failed reason is Unknown.
- Specified by:
getFailedReason in interface BaseFuture- Overrides:
getFailedReason in class BaseFutureImpl
- Returns:
- Returns the reason why a future failed.
getLast
public K getLast()
getIntermediateFutures
public List<K> getIntermediateFutures()
- This is only safe to access is this future has completed!
- Returns:
- The list of finished futures indexes before complete has been
called. This does not include the last future index, which can be
accessed using getLast().
getAll
public K[] getAll()
getSuccessCounter
public int getSuccessCounter()
Copyright © 2011. All Rights Reserved.