public class ReplicationExecutor extends Object implements ResponsibilityListener, Runnable
| Constructor and Description |
|---|
ReplicationExecutor(Peer peer)
Constructor for the default indirect replication.
|
| Modifier and Type | Method and Description |
|---|---|
void |
meResponsible(Number160 locationKey)
The responsibilty changed to our peer.
|
void |
otherResponsible(Number160 locationKey,
PeerAddress other)
Here an other peer is responsible and we need to transfer data.
|
void |
run() |
protected FutureDHT |
send(Number160 locationKey,
Number160 domainKey,
Map<Number160,Data> dataMapConverted)
If my peer is responsible, I'll issue a put if absent to make sure all replicas are stored.
|
protected void |
sendDirect(PeerAddress other,
Number160 locationKey,
Number160 domainKey,
Map<Number160,Data> dataMapConverted)
If an other peer is responsible, we send this peer our data, so that the other peer can take care of this.
|
public ReplicationExecutor(Peer peer)
peer - The peerpublic void otherResponsible(Number160 locationKey, PeerAddress other)
ResponsibilityListenerotherResponsible in interface ResponsibilityListenerlocationKey - The location keyother - The other peer that is responsible for locationKeypublic void meResponsible(Number160 locationKey)
ResponsibilityListenermeResponsible in interface ResponsibilityListenerlocationKey - The location keyprotected FutureDHT send(Number160 locationKey, Number160 domainKey, Map<Number160,Data> dataMapConverted)
locationKey - The location keydomainKey - The domain keydataMapConverted - The data to storeprotected void sendDirect(PeerAddress other, Number160 locationKey, Number160 domainKey, Map<Number160,Data> dataMapConverted)
other - The other peerlocationKey - The location keydomainKey - The domain keydataMapConverted - The data to storeCopyright © 2013. All Rights Reserved.