de.uniba.wiai.lspi.chord.com.rmi
Class RMIEndpoint
java.lang.Object
de.uniba.wiai.lspi.chord.com.Endpoint
de.uniba.wiai.lspi.chord.com.rmi.RMIEndpoint
- All Implemented Interfaces:
- RemoteNode, Remote
public final class RMIEndpoint
- extends Endpoint
- implements RemoteNode
| Methods inherited from class de.uniba.wiai.lspi.chord.com.Endpoint |
acceptEntries, createEndpoint, deregister, disconnect, getEndpoint, getNode, getState, getURL, listen, notify, register, setState, toString |
RMIEndpoint
public RMIEndpoint(Node node1,
URL url1)
closeConnections
protected void closeConnections()
- Description copied from class:
Endpoint
- This method has to be overwritten by sub classes and is invoked by
Endpoint.disconnect()to close all connections from the chord network.
- Specified by:
closeConnections in class Endpoint
entriesAcceptable
protected void entriesAcceptable()
- Description copied from class:
Endpoint
- This method has to be overwritten by subclasses. It is called from
Endpoint.acceptEntries()to indicate that entries can now be accepted. So
maybe if an endpoint queues incoming requests for storage or removal of
entries this requests can be answered when endpoint changes it state to
ACCEPT_ENTRIES.
- Specified by:
entriesAcceptable in class Endpoint
openConnections
protected void openConnections()
- Description copied from class:
Endpoint
- To implemented by sub classes. This method is called by
Endpoint.listen()to
make it possible for other chord nodes to connect to the node on that
this endpoint invocates methods.
TODO: This method may throw an exception when starting to listen for
incoming connections.
- Specified by:
openConnections in class Endpoint
findSuccessor
public de.uniba.wiai.lspi.chord.com.rmi.RemoteNodeInfo findSuccessor(ID key)
throws CommunicationException,
RemoteException
- Specified by:
findSuccessor in interface RemoteNode
- Returns:
-
- Throws:
CommunicationException
RemoteException
getNodeID
public ID getNodeID()
throws RemoteException
- Specified by:
getNodeID in interface RemoteNode
- Returns:
-
- Throws:
RemoteException
insertEntry
public void insertEntry(Entry entryToInsert)
throws RemoteException,
CommunicationException
- Specified by:
insertEntry in interface RemoteNode
- Throws:
RemoteException
CommunicationException
insertReplicas
public void insertReplicas(Set<Entry> entries)
throws RemoteException,
CommunicationException
- Specified by:
insertReplicas in interface RemoteNode
- Throws:
RemoteException
CommunicationException
leavesNetwork
public void leavesNetwork(de.uniba.wiai.lspi.chord.com.rmi.RemoteNodeInfo predecessor)
throws RemoteException,
CommunicationException
- Specified by:
leavesNetwork in interface RemoteNode
- Throws:
RemoteException
CommunicationException
notify
public List<de.uniba.wiai.lspi.chord.com.rmi.RemoteNodeInfo> notify(de.uniba.wiai.lspi.chord.com.rmi.RemoteNodeInfo potentialPredecessor)
throws RemoteException,
CommunicationException
- Specified by:
notify in interface RemoteNode
- Returns:
-
- Throws:
RemoteException
CommunicationException
notifyAndCopyEntries
public de.uniba.wiai.lspi.chord.com.rmi.RemoteRefsAndEntries notifyAndCopyEntries(de.uniba.wiai.lspi.chord.com.rmi.RemoteNodeInfo potentialPredecessor)
throws RemoteException,
CommunicationException
- Specified by:
notifyAndCopyEntries in interface RemoteNode
- Returns:
-
- Throws:
RemoteException
CommunicationException
ping
public void ping()
throws RemoteException
- Specified by:
ping in interface RemoteNode
- Throws:
RemoteException
removeEntry
public void removeEntry(Entry entryToRemove)
throws RemoteException,
CommunicationException
- Specified by:
removeEntry in interface RemoteNode
- Throws:
RemoteException
CommunicationException
removeReplicas
public void removeReplicas(ID sendingNode,
Set<Entry> replicasToRemove)
throws RemoteException,
CommunicationException
- Specified by:
removeReplicas in interface RemoteNode
- Throws:
RemoteException
CommunicationException
retrieveEntries
public Set<Entry> retrieveEntries(ID id)
throws RemoteException,
CommunicationException
- Specified by:
retrieveEntries in interface RemoteNode
- Returns:
-
- Throws:
RemoteException
CommunicationException
Copyright © 2004-2008 Karsten Loesing, Sven Kaffille - Distributed and Mobile Systems Group, Lehrstuhl für Praktische Informatik, Universität Bamberg. All Rights Reserved.