de.uniba.wiai.lspi.chord.com.rmi
Class RMIEndpoint

java.lang.Object
  extended by de.uniba.wiai.lspi.chord.com.Endpoint
      extended by de.uniba.wiai.lspi.chord.com.rmi.RMIEndpoint
All Implemented Interfaces:
RemoteNode, java.rmi.Remote

public final class RMIEndpoint
extends Endpoint
implements RemoteNode


Field Summary
 
Fields inherited from class de.uniba.wiai.lspi.chord.com.Endpoint
ACCEPT_ENTRIES, DISCONNECTED, LISTENING, METHODS_ALLOWED_IN_ACCEPT_ENTRIES, STARTED
 
Constructor Summary
RMIEndpoint(Node node1, URL url1)
           
 
Method Summary
 de.uniba.wiai.lspi.chord.com.rmi.RemoteNodeInfo findSuccessor(ID key)
           
 ID getNodeID()
           
 void insertEntry(Entry entryToInsert)
           
 void insertReplicas(java.util.Set<Entry> entries)
           
 void leavesNetwork(de.uniba.wiai.lspi.chord.com.rmi.RemoteNodeInfo predecessor)
           
 java.util.List<de.uniba.wiai.lspi.chord.com.rmi.RemoteNodeInfo> notify(de.uniba.wiai.lspi.chord.com.rmi.RemoteNodeInfo potentialPredecessor)
           
 de.uniba.wiai.lspi.chord.com.rmi.RemoteRefsAndEntries notifyAndCopyEntries(de.uniba.wiai.lspi.chord.com.rmi.RemoteNodeInfo potentialPredecessor)
           
 void ping()
           
 void removeEntry(Entry entryToRemove)
           
 void removeReplicas(ID sendingNode, java.util.Set<Entry> replicasToRemove)
           
 java.util.Set<Entry> retrieveEntries(ID id)
           
 
Methods inherited from class de.uniba.wiai.lspi.chord.com.Endpoint
acceptEntries, createEndpoint, deregister, disconnect, getEndpoint, getNode, getState, getURL, listen, register, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RMIEndpoint

public RMIEndpoint(Node node1,
                   URL url1)
Method Detail

findSuccessor

public de.uniba.wiai.lspi.chord.com.rmi.RemoteNodeInfo findSuccessor(ID key)
                                                              throws CommunicationException,
                                                                     java.rmi.RemoteException
Specified by:
findSuccessor in interface RemoteNode
Returns:
Throws:
CommunicationException
java.rmi.RemoteException

getNodeID

public ID getNodeID()
             throws java.rmi.RemoteException
Specified by:
getNodeID in interface RemoteNode
Returns:
Throws:
java.rmi.RemoteException

insertEntry

public void insertEntry(Entry entryToInsert)
                 throws java.rmi.RemoteException,
                        CommunicationException
Specified by:
insertEntry in interface RemoteNode
Throws:
java.rmi.RemoteException
CommunicationException

insertReplicas

public void insertReplicas(java.util.Set<Entry> entries)
                    throws java.rmi.RemoteException,
                           CommunicationException
Specified by:
insertReplicas in interface RemoteNode
Throws:
java.rmi.RemoteException
CommunicationException

leavesNetwork

public void leavesNetwork(de.uniba.wiai.lspi.chord.com.rmi.RemoteNodeInfo predecessor)
                   throws java.rmi.RemoteException,
                          CommunicationException
Specified by:
leavesNetwork in interface RemoteNode
Throws:
java.rmi.RemoteException
CommunicationException

notify

public java.util.List<de.uniba.wiai.lspi.chord.com.rmi.RemoteNodeInfo> notify(de.uniba.wiai.lspi.chord.com.rmi.RemoteNodeInfo potentialPredecessor)
                                                                       throws java.rmi.RemoteException,
                                                                              CommunicationException
Specified by:
notify in interface RemoteNode
Returns:
Throws:
java.rmi.RemoteException
CommunicationException

notifyAndCopyEntries

public de.uniba.wiai.lspi.chord.com.rmi.RemoteRefsAndEntries notifyAndCopyEntries(de.uniba.wiai.lspi.chord.com.rmi.RemoteNodeInfo potentialPredecessor)
                                                                           throws java.rmi.RemoteException,
                                                                                  CommunicationException
Specified by:
notifyAndCopyEntries in interface RemoteNode
Returns:
Throws:
java.rmi.RemoteException
CommunicationException

ping

public void ping()
          throws java.rmi.RemoteException
Specified by:
ping in interface RemoteNode
Throws:
java.rmi.RemoteException

removeEntry

public void removeEntry(Entry entryToRemove)
                 throws java.rmi.RemoteException,
                        CommunicationException
Specified by:
removeEntry in interface RemoteNode
Throws:
java.rmi.RemoteException
CommunicationException

removeReplicas

public void removeReplicas(ID sendingNode,
                           java.util.Set<Entry> replicasToRemove)
                    throws java.rmi.RemoteException,
                           CommunicationException
Specified by:
removeReplicas in interface RemoteNode
Throws:
java.rmi.RemoteException
CommunicationException

retrieveEntries

public java.util.Set<Entry> retrieveEntries(ID id)
                                     throws java.rmi.RemoteException,
                                            CommunicationException
Specified by:
retrieveEntries in interface RemoteNode
Returns:
Throws:
java.rmi.RemoteException
CommunicationException