|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.uniba.wiai.lspi.chord.com.Node
de.uniba.wiai.lspi.chord.com.Proxy
de.uniba.wiai.lspi.chord.com.rmi.RMIProxy
public final class RMIProxy
| Field Summary |
|---|
| Fields inherited from class de.uniba.wiai.lspi.chord.com.Node |
|---|
nodeID, nodeURL |
| Method Summary | |
|---|---|
static RMIProxy |
create(URL localURL,
URL url)
|
void |
disconnect()
Closes the connection to the node. |
Node |
findSuccessor(ID key)
Returns the Chord node which is responsible for the given key. |
void |
insertEntry(Entry entryToInsert)
Stores the given object under the given ID. |
void |
insertReplicas(Set<Entry> entries)
Inserts replicates of the given entries. |
void |
leavesNetwork(Node predecessor)
Inform a node that its predecessor leaves the network. |
List<Node> |
notify(Node predecessor)
Requests this node's predecessor in result[0] and successor list in result[1..length-1]. |
RefsAndEntries |
notifyAndCopyEntries(Node predecessor)
Requests this node's predecessor, successor list and entries. |
void |
ping()
Requests a sign of live. |
void |
removeEntry(Entry entryToRemove)
Removes the given object from the list stored under the given ID. |
void |
removeReplicas(ID sendingNode,
Set<Entry> replicasToRemove)
Removes replicates of the given entries. |
Set<Entry> |
retrieveEntries(ID id)
Returns all entries stored under the given ID. |
void |
testConnection()
|
| Methods inherited from class de.uniba.wiai.lspi.chord.com.Proxy |
|---|
createConnection |
| Methods inherited from class de.uniba.wiai.lspi.chord.com.Node |
|---|
equals, getNodeID, getNodeURL, hashCode, setNodeID, setNodeURL, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static RMIProxy create(URL localURL,
URL url)
throws CommunicationException
localURL - url -
CommunicationExceptionpublic void disconnect()
Node
disconnect in class Node
public void testConnection()
throws CommunicationException
CommunicationException
public Node findSuccessor(ID key)
throws CommunicationException
Node
findSuccessor in class Nodekey - Key for which the successor is searched for.
CommunicationException - Thrown if an unresolvable communication failure occurs.
public void insertEntry(Entry entryToInsert)
throws CommunicationException
Node
insertEntry in class NodeCommunicationException - Thrown if an unresolvable communication failure occurs.
public void insertReplicas(Set<Entry> entries)
throws CommunicationException
Node
insertReplicas in class Nodeentries - The entries that are replicated.
CommunicationException - Thrown if an unresolvable communication failure occurs.
public void leavesNetwork(Node predecessor)
throws CommunicationException
Node
leavesNetwork in class NodeCommunicationException - Thrown if an unresolvable communication failure occurs.
public List<Node> notify(Node predecessor)
throws CommunicationException
Node
notify in class NodeCommunicationException - Thrown if an unresolvable communication failure occurs.
public RefsAndEntries notifyAndCopyEntries(Node predecessor)
throws CommunicationException
Node
notifyAndCopyEntries in class Nodepredecessor - Remote node which invokes this method
CommunicationException
public void ping()
throws CommunicationException
Node
ping in class NodeCommunicationException - Thrown if an unresolvable communication failure occurs.
public void removeEntry(Entry entryToRemove)
throws CommunicationException
Node
removeEntry in class NodeentryToRemove - The entry to remove from the dht.
CommunicationException - Thrown if an unresolvable communication failure occurs.
public void removeReplicas(ID sendingNode,
Set<Entry> replicasToRemove)
throws CommunicationException
Node
removeReplicas in class NodesendingNode - ID of sending node; if entriesToRemove is empty, all replicas
with ID smaller than the sending node's ID are removedreplicasToRemove - Replicas to remove; if empty, all replicas with ID smaller
than the sending node's ID are removed
CommunicationException - Thrown if an unresolvable communication failure occurs.
public Set<Entry> retrieveEntries(ID id)
throws CommunicationException
Node
retrieveEntries in class NodeSet of entries associated with id.
CommunicationException - Thrown if an unresolvable communication failure occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||