public class FutureRemove extends FutureDHT<FutureRemove>
BaseFuture.FutureTypecompleted, lock, reason, type| Constructor and Description |
|---|
FutureRemove(DHTBuilder<?> builder) |
FutureRemove(DHTBuilder<?> builder,
int dataSize)
Default constructor.
|
FutureRemove(DHTBuilder<?> builder,
int min,
EvaluatingSchemeDHT evaluationScheme,
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() |
Map<Number640,Data> |
dataMap()
Return the data from get() after evaluation.
|
Collection<Number640> |
evalKeys()
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() |
Map<PeerAddress,Map<Number640,Data>> |
rawData()
Returns the raw data from the get operation.
|
Map<PeerAddress,Map<Number640,Byte>> |
rawKeys()
Returns the raw keys from the storage or removal operation.
|
void |
receivedData(Map<PeerAddress,Map<Number640,Data>> rawData)
Finish the future and set the keys and data that have been received.
|
Map<Number640,Integer> |
result()
Returns the keys that have been stored or removed after evaluation.
|
void |
storedKeys(Map<PeerAddress,Map<Number640,Byte>> rawKeys640)
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 FutureRemove(DHTBuilder<?> builder)
public FutureRemove(DHTBuilder<?> builder, int dataSize)
public FutureRemove(DHTBuilder<?> builder, int min, EvaluatingSchemeDHT evaluationScheme, int dataSize)
min - The minimum of expected resultsevaluationScheme - The scheme to evaluate results from multiple peerspublic void storedKeys(Map<PeerAddress,Map<Number640,Byte>> rawKeys640)
avgStoredKeys()
or if the evaluation should be done by the user, use rawKeys().domainKey - The domain keylocationKey - The location keyrawKeys - 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 void receivedData(Map<PeerAddress,Map<Number640,Data>> rawData)
rawData - The keys and data that have been received with information from which peer it has been received.public Map<PeerAddress,Map<Number640,Byte>> rawKeys()
public boolean isMinReached()
public Collection<Number640> evalKeys()
evalKeys() instead of this method.public Map<PeerAddress,Map<Number640,Data>> rawData()
public Map<Number640,Data> dataMap()
public Map<Number640,Integer> result()
FuturePut#evalKeys() instead of this method.public boolean isSuccess()
isSuccess in interface BaseFutureisSuccess in class BaseFutureImpl<FutureRemove>Copyright © 2014. All rights reserved.