|
||||||||||
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
public abstract class Node
Provides methods which remote nodes can invoke.
Constructor Summary | |
---|---|
Node()
|
Method Summary | |
---|---|
abstract void |
disconnect()
Closes the connection to the node. |
boolean |
equals(java.lang.Object arg0)
|
abstract java.util.List<ResponsibleNode> |
findSuccessor(int tag,
java.lang.String res,
URL url)
Returns the node which is responsible for the given resource. |
abstract Node |
findSuccessorAtFloor(Floor f,
ID key)
Returns the node which is responsible for the given key at given floor. |
abstract Floor |
getFirstFloor()
|
abstract ID |
getIdForFloor(Floor floor)
|
URL |
getNodeURL()
|
int |
hashCode()
|
abstract void |
insertEntry(Floor floor,
Entry entryToInsert)
Stores the given object under the given ID at given floor. |
abstract void |
insertReplicas(Floor floor,
java.util.Set<Entry> entries)
Inserts replicates of the given entries for given floor. |
abstract void |
leavesNetwork(Floor floor,
Node predecessor)
Inform all predecessor of given node that it leaves the network. |
abstract java.util.List<Node> |
notify(Floor floor,
Node potentialPredecessor)
Requests this node's predecessor at given floor in result[0] and successor list in result[1..length-1]. |
abstract RefsAndEntries |
notifyAndCopyEntries(Floor floor,
Node potentialPredecessor)
Requests this node's predecessor, successor list and entries at given floor. |
abstract void |
ping()
Requests a sign of live. |
abstract void |
removeEntry(Floor floor,
Entry entryToRemove)
Removes the given object from the list stored under the given ID at given floor. |
abstract void |
removeReplicas(Floor floor,
ID sendingNode,
java.util.Set<Entry> replicasToRemove)
Removes replicates of the given entries for given floor. |
abstract java.util.Set<Entry> |
retrieveEntries(Floor floor,
ID id)
Returns all entries stored under the given ID. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Node()
Method Detail |
---|
public final boolean equals(java.lang.Object arg0)
equals
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public final URL getNodeURL()
public abstract Node findSuccessorAtFloor(Floor f, ID key) throws CommunicationException
f
- Floor at which is searched being held.key
- Key for which the successor is searched for.
CommunicationException
public abstract java.util.List<ResponsibleNode> findSuccessor(int tag, java.lang.String res, URL url) throws CommunicationException
tag
- Tag for checking is the request is already processed.res
- Resource for which the successor is searched for.url
- URL of the node which successor is searched for.
CommunicationException
public abstract java.util.List<Node> notify(Floor floor, Node potentialPredecessor) throws CommunicationException
potentialPredecessor
- floor
-
CommunicationException
- Thrown if an unresolvable communication failure occurs.public abstract RefsAndEntries notifyAndCopyEntries(Floor floor, Node potentialPredecessor) throws CommunicationException
floor
- potentialPredecessor
- Remote node which invokes this method
CommunicationException
public abstract void ping() throws CommunicationException
CommunicationException
- Thrown if an unresolvable communication failure occurs.public abstract void insertEntry(Floor floor, Entry entryToInsert) throws CommunicationException
floor
- entryToInsert
-
CommunicationException
- Thrown if an unresolvable communication failure occurs.public abstract void insertReplicas(Floor floor, java.util.Set<Entry> entries) throws CommunicationException
floor
- entries
- The entries that are replicated.
CommunicationException
- Thrown if an unresolvable communication failure occurs.public abstract void removeEntry(Floor floor, Entry entryToRemove) throws CommunicationException
floor
- entryToRemove
- The entry to remove from the dht.
CommunicationException
- Thrown if an unresolvable communication failure occurs.public abstract void removeReplicas(Floor floor, ID sendingNode, java.util.Set<Entry> replicasToRemove) throws CommunicationException
floor
- sendingNode
- 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 abstract java.util.Set<Entry> retrieveEntries(Floor floor, ID id) throws CommunicationException
id
-
Set
of entries associated with id
.
CommunicationException
- Thrown if an unresolvable communication failure occurs.public abstract void leavesNetwork(Floor floor, Node predecessor) throws CommunicationException
predecessor
-
CommunicationException
- Thrown if an unresolvable communication failure occurs.public abstract void disconnect()
public abstract ID getIdForFloor(Floor floor)
public abstract Floor getFirstFloor() throws CommunicationException
CommunicationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |