public class DistributedHashTable extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
REASON_CANCEL |
static int |
REASON_UNKOWN |
| Constructor and Description |
|---|
DistributedHashTable(DistributedRouting routing,
StorageRPC storeRCP,
DirectDataRPC directDataRPC) |
| Modifier and Type | Method and Description |
|---|---|
FuturePut |
add(AddBuilder builder) |
static RequestP2PConfiguration |
adjustConfiguration(RequestP2PConfiguration p2pConfiguration,
int size)
Adjusts the number of minimum requests in the P2P configuration.
|
FutureDigest |
digest(DigestBuilder builder) |
FutureSend |
direct(SendBuilder builder) |
FutureGet |
get(GetBuilder builder) |
static <K extends FutureDHT<?>> |
parallelRequests(RequestP2PConfiguration p2pConfiguration,
NavigableSet<PeerAddress> directHit,
NavigableSet<PeerAddress> potentialHit,
boolean cancleOnFinish,
FutureChannelCreator futureChannelCreator,
OperationMapper<K> operation,
K futureDHT)
Creates RPCs and executes them parallel.
|
FuturePut |
put(PutBuilder putBuilder) |
FutureRemove |
remove(RemoveBuilder builder) |
public static final int REASON_CANCEL
public static final int REASON_UNKOWN
public DistributedHashTable(DistributedRouting routing, StorageRPC storeRCP, DirectDataRPC directDataRPC)
public FuturePut add(AddBuilder builder)
public FutureSend direct(SendBuilder builder)
public FuturePut put(PutBuilder putBuilder)
public FutureGet get(GetBuilder builder)
public FutureDigest digest(DigestBuilder builder)
public FutureRemove remove(RemoveBuilder builder)
public static <K extends FutureDHT<?>> K parallelRequests(RequestP2PConfiguration p2pConfiguration, NavigableSet<PeerAddress> directHit, NavigableSet<PeerAddress> potentialHit, boolean cancleOnFinish, FutureChannelCreator futureChannelCreator, OperationMapper<K> operation, K futureDHT)
p2pConfiguration - The configuration that specifies e.g. how many parallel requests there are.queue - The sorted set that will be queries. The first RPC takes the first in the queue.futureDHT - The future object that tracks the progresscancleOnFinish - Set to true if the operation should be canceled (e.g. file transfer) if the future has finished.operation - The operation that creates the requestpublic static RequestP2PConfiguration adjustConfiguration(RequestP2PConfiguration p2pConfiguration, int size)
p2pConfiguration - The old P2P configuration with the user specified minimum resultdirectHitsDigest - The digest information from the routing processCopyright © 2014. All rights reserved.