|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.tomp2p.replication.Replication
public class Replication
This class has 3 methods that are called from outside eventes: check, peerInsert, peerRemoved.
| Constructor Summary | |
|---|---|
Replication(ReplicationStorage replicationStorage,
PeerAddress selfAddress,
PeerMap peerMap)
|
|
| Method Summary | |
|---|---|
void |
addResponsibilityListener(ResponsibilityListener responsibilityListener)
|
void |
checkResponsibility(Number160 locationKey)
|
boolean |
isReplicationEnabled()
|
void |
peerInserted(PeerAddress peerAddress)
This method is called if a peer is added to the map |
void |
peerRemoved(PeerAddress peerAddress)
This method is called if a peer is removed from the map |
void |
peerUpdated(PeerAddress peerAddress)
This method is called if a peer is updated. |
void |
removeResponsibilityListener(ResponsibilityListener responsibilityListener)
|
void |
updatePeerMapIfCloser(Number160 locationKey,
Number160 current)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Replication(ReplicationStorage replicationStorage,
PeerAddress selfAddress,
PeerMap peerMap)
| Method Detail |
|---|
public boolean isReplicationEnabled()
public void addResponsibilityListener(ResponsibilityListener responsibilityListener)
public void removeResponsibilityListener(ResponsibilityListener responsibilityListener)
public void checkResponsibility(Number160 locationKey)
public void updatePeerMapIfCloser(Number160 locationKey,
Number160 current)
public void peerInserted(PeerAddress peerAddress)
PeerMapChangeListener
peerInserted in interface PeerMapChangeListenerpeerAddress - The peer that has been added.public void peerRemoved(PeerAddress peerAddress)
PeerMapChangeListener
peerRemoved in interface PeerMapChangeListenerpeerAddress - The peer that has been removed and add to the cache.public void peerUpdated(PeerAddress peerAddress)
PeerMapChangeListener
peerUpdated in interface PeerMapChangeListenerpeerAddress - The peer can change its IP and some statistical data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||