net.tomp2p.futures
Class FutureTask
java.lang.Object
net.tomp2p.futures.BaseFutureImpl
net.tomp2p.futures.FutureTask
- All Implemented Interfaces:
- BaseFuture, Cancellable
public class FutureTask
- extends BaseFutureImpl
This future keeps track of one or more tasks send to remote peers.
- Author:
- Thomas Bocek
Methods inherited from class net.tomp2p.futures.BaseFutureImpl |
addCancellation, addListener, await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, getFailedReason, getType, isCompleted, isFailed, isSuccess, notifyListerenrs, removeCancellation, removeListener, setCompletedAndNotify, setFailed, setFailed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FutureTask
public FutureTask()
addRequests
public void addRequests(FutureAsyncTask futureResponse)
- Adds all requests that have been created for the DHT operations. Those
were created after the routing process.
- Parameters:
futureResponse
- The futurRepsonse that has been created
setDone
public void setDone()
- Finishes the future. Set the future to success if at least one of the
future was a success.
setProgress
public void setProgress(FutureAsyncTask futureAsyncTask)
- This is called for intermediate results. Whenever a
FutureAsyncTask
is ready, update the result data.
- Parameters:
futureAsyncTask
- The future that has finished
Copyright © 2012. All Rights Reserved.