public class FutureDigest extends FutureDHT<FutureDigest>
BaseFuture.FutureTypecompleted, lock, reason, type| Constructor and Description |
|---|
FutureDigest(DHTBuilder<?> builder)
Default constructor.
|
FutureDigest(DHTBuilder<?> builder,
int min,
EvaluatingSchemeDHT evaluationScheme)
Creates a new DHT future object that keeps track of the status of the DHT operations.
|
| Modifier and Type | Method and Description |
|---|---|
DigestResult |
digest()
Return the digest information from the get() after evaluation.
|
boolean |
isMinReached()
Checks if the minimum of expected results have been reached.
|
Map<PeerAddress,DigestResult> |
rawDigest() |
void |
receivedDigest(Map<PeerAddress,DigestResult> rawDigest)
Finishes the future and set the digest information that have been received.
|
addFutureDHTReleaseListener, addRequests, builder, futureRequests, futureRouting, futureRoutingaddCancel, addListener, addListener, await, await, awaitListeners, awaitListenersUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, cancel, completedAndNotify, failed, failed, failed, failed, failed, failedReason, isCompleted, isFailed, isSuccess, notifyListeners, removeCancel, removeListener, self, self, typepublic FutureDigest(DHTBuilder<?> builder)
public FutureDigest(DHTBuilder<?> builder, int min, EvaluatingSchemeDHT evaluationScheme)
min - The minimum of expected resultsevaluationScheme - The scheme to evaluate results from multiple peerspublic void receivedDigest(Map<PeerAddress,DigestResult> rawDigest)
rawDigest - The hashes of the content stored with information from which peer it has been received.public Map<PeerAddress,DigestResult> rawDigest()
public DigestResult digest()
public boolean isMinReached()
Copyright © 2014. All rights reserved.