public class PeerDHT extends Object
| Modifier and Type | Method and Description |
|---|---|
AddBuilder |
add(Number160 locationKey) |
DigestBuilder |
digest(Number160 locationKey) |
DistributedHashTable |
distributedHashTable() |
GetBuilder |
get(Number160 locationKey) |
ParallelRequestBuilder<?> |
parallelRequest(Number160 locationKey) |
Peer |
peer() |
PeerAddress |
peerAddress() |
PeerBean |
peerBean() |
Number160 |
peerID() |
PutBuilder |
put(Number160 locationKey) |
RemoveBuilder |
remove(Number160 locationKey) |
SendBuilder |
send(Number160 locationKey)
The send method works as follows:
|
BaseFuture |
shutdown() |
StorageLayer |
storageLayer() |
StorageRPC |
storeRPC() |
public Peer peer()
public StorageRPC storeRPC()
public DistributedHashTable distributedHashTable()
public StorageLayer storageLayer()
public AddBuilder add(Number160 locationKey)
public PutBuilder put(Number160 locationKey)
public GetBuilder get(Number160 locationKey)
public DigestBuilder digest(Number160 locationKey)
public RemoveBuilder remove(Number160 locationKey)
public SendBuilder send(Number160 locationKey)
1. routing: find close peers to the content hash.
You can control the routing behavior with
setRoutingConfiguration()
2. sending: send the data to the n closest peers.
N is set via setRequestP2PConfiguration().
If you want to send it to the closest one, use
setRequestP2PConfiguration(1, 5, 0)
locationKey - The target hash to search for during the routing processpublic ParallelRequestBuilder<?> parallelRequest(Number160 locationKey)
public BaseFuture shutdown()
public PeerBean peerBean()
public Number160 peerID()
public PeerAddress peerAddress()
Copyright © 2015. All rights reserved.