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
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 -
setFinish
protected boolean setFinish(K last,
BaseFuture.FutureType type)
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()
getAll
public List<K> getAll()
getSuccessCounter
public int getSuccessCounter()
Copyright © 2011. All Rights Reserved.