net.tomp2p.replication
Class Replication
java.lang.Object
net.tomp2p.replication.Replication
- All Implemented Interfaces:
- PeerMapChangeListener
public class Replication
- extends Object
- implements PeerMapChangeListener
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Replication
public Replication(Storage storage,
PeerAddress selfAddress,
PeerMap peerMap)
isReplicationEnabled
public boolean isReplicationEnabled()
addResponsibilityListener
public void addResponsibilityListener(ResponsibilityListener responsibilityListener)
removeResponsibilityListener
public void removeResponsibilityListener(ResponsibilityListener responsibilityListener)
checkResponsibility
public void checkResponsibility(Number160 locationKey)
updatePeerMapIfCloser
public void updatePeerMapIfCloser(Number160 locationKey,
Number160 current)
peerInserted
public void peerInserted(PeerAddress peerAddress)
- Description copied from interface:
PeerMapChangeListener
- This method is called if a peer is added to the map
- Specified by:
peerInserted in interface PeerMapChangeListener
- Parameters:
peerAddress - The peer that has been added.
peerRemoved
public void peerRemoved(PeerAddress peerAddress)
- Description copied from interface:
PeerMapChangeListener
- This method is called if a peer is removed from the map
- Specified by:
peerRemoved in interface PeerMapChangeListener
- Parameters:
peerAddress - The peer that has been removed and add to the cache.
peerUpdated
public void peerUpdated(PeerAddress peerAddress)
- Description copied from interface:
PeerMapChangeListener
- This method is called if a peer is updated.
- Specified by:
peerUpdated in interface PeerMapChangeListener
- Parameters:
peerAddress - The peer can change its IP and some statistical data
getStorage
public Storage getStorage()
Copyright © 2011. All Rights Reserved.