public class FuturePut extends FutureDHT<FuturePut>
BaseFuture.FutureTypecompleted, lock, reason, type| Constructor and Description |
|---|
FuturePut(DHTBuilder<?> builder,
int min,
int dataSize)
Creates a new DHT future object that keeps track of the status of the DHT operations.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getAvgStoredKeys() |
Map<PeerAddress,Map<Number640,Byte>> |
getRawResult()
Returns the raw result from the storage or removal operation.
|
Map<Number640,Integer> |
getResult()
Returns the keys that have been stored or removed after evaluation.
|
boolean |
isMinReached()
Checks if the minimum of expected results have been reached.
|
boolean |
isSuccess()
Returns the opposite of isFailed (returns !isFailed).
|
boolean |
isSuccessPartially() |
void |
setStoredKeys(Map<PeerAddress,Map<Number640,Byte>> rawResult)
Finish the future and set the keys that have been stored.
|
addFutureDHTReleaseListener, addRequests, builder, getFutureRequests, getFutureRouting, setFutureRoutingaddCancel, addListener, addListener, await, await, awaitListeners, awaitListenersUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, cancel, getFailedReason, getType, isCompleted, isFailed, notifyListeners, removeCancel, removeListener, self, setCompletedAndNotify, setFailed, setFailed, setFailed, setFailed, setFailedpublic FuturePut(DHTBuilder<?> builder, int min, int dataSize)
min - The minimum of expected resultsevaluationScheme - The scheme to evaluate results from multiple peerspublic void setStoredKeys(Map<PeerAddress,Map<Number640,Byte>> rawResult)
getAvgStoredKeys()
or if the evaluation should be done by the user, use #getRawKeys().rawKeys - The keys that have been stored with information on which peer it has been storedrawKeys480 - The keys with locationKey and domainKey Flag if the user requested putIfAbsentpublic double getAvgStoredKeys()
public Map<PeerAddress,Map<Number640,Byte>> getRawResult()
public boolean isMinReached()
public Map<Number640,Integer> getResult()
FuturePut#getEvalKeys() instead of this method.public boolean isSuccess()
BaseFutureisSuccess in interface BaseFutureisSuccess in class BaseFutureImpl<FuturePut>public boolean isSuccessPartially()
Copyright © 2014. All rights reserved.