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 |
avgStoredKeys() |
boolean |
isMinReached()
Checks if the minimum of expected results have been reached.
|
boolean |
isSuccess() |
boolean |
isSuccessPartially() |
Map<PeerAddress,Map<Number640,Byte>> |
rawResult()
Returns the raw result from the storage or removal operation.
|
Map<Number640,Integer> |
result()
Returns the keys that have been stored or removed after evaluation.
|
void |
storedKeys(Map<PeerAddress,Map<Number640,Byte>> rawResult)
Finish the future and set the keys that have been stored.
|
addFutureDHTReleaseListener, addRequests, builder, futureRequests, futureRouting, futureRoutingaddCancel, addListener, addListener, await, await, awaitListeners, awaitListenersUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, cancel, completedAndNotify, failed, failed, failed, failed, failed, failedReason, isCompleted, isFailed, notifyListeners, removeCancel, removeListener, self, self, typepublic FuturePut(DHTBuilder<?> builder, int min, int dataSize)
min - The minimum of expected resultsevaluationScheme - The scheme to evaluate results from multiple peerspublic void storedKeys(Map<PeerAddress,Map<Number640,Byte>> rawResult)
avgStoredKeys()
or if the evaluation should be done by the user, use #rawKeys().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 avgStoredKeys()
public Map<PeerAddress,Map<Number640,Byte>> rawResult()
public boolean isMinReached()
public Map<Number640,Integer> result()
FuturePut#evalKeys() instead of this method.public boolean isSuccess()
isSuccess in interface BaseFutureisSuccess in class BaseFutureImpl<FuturePut>public boolean isSuccessPartially()
Copyright © 2014. All rights reserved.