|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface to a generic set of nodes.
Method Summary | |
rice.pastry.NodeHandle |
get(int i)
Gets the ith element in the set. |
rice.pastry.NodeHandle |
get(rice.pastry.NodeId nid)
Finds the NodeHandle associated with the NodeId. |
int |
getIndex(rice.pastry.NodeId nid)
Gets the index of the element with the given node id. |
boolean |
member(rice.pastry.NodeId nid)
Verifies if the set contains this particular id. |
boolean |
put(rice.pastry.NodeHandle handle)
Puts a NodeHandle into the set. |
rice.pastry.NodeHandle |
remove(rice.pastry.NodeId nid)
Removes a node id and its handle from the set. |
int |
size()
Gets the size of the set. |
Methods inherited from interface rice.p2p.commonapi.NodeHandleSet |
getHandle, getHandle, getIndexHandle, memberHandle, putHandle, removeHandle |
Method Detail |
public boolean put(rice.pastry.NodeHandle handle)
handle
- the handle to put.
public rice.pastry.NodeHandle get(rice.pastry.NodeId nid)
nid
- a node id.
public rice.pastry.NodeHandle get(int i)
i
- an index.
public boolean member(rice.pastry.NodeId nid)
nid
- a node id.
public rice.pastry.NodeHandle remove(rice.pastry.NodeId nid)
nid
- the node to remove.
public int size()
size
in interface NodeHandleSet
public int getIndex(rice.pastry.NodeId nid) throws java.util.NoSuchElementException
nid
- the node id.
java.util.NoSuchElementException
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |