|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NodeSetI
An interface to a generic set of nodes.
Method Summary | |
---|---|
NodeHandle |
get(Id nid)
Finds the NodeHandle associated with the NodeId. |
NodeHandle |
get(int i)
Gets the ith element in the set. |
int |
getIndex(Id nid)
Gets the index of the element with the given node id. |
int |
getIndex(NodeHandle nh)
|
boolean |
member(NodeHandle nh)
Verifies if the set contains this particular id. |
boolean |
put(NodeHandle handle)
Puts a NodeHandle into the set. |
NodeHandle |
remove(NodeHandle nh)
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, getType, memberHandle, putHandle, removeHandle, serialize |
Method Detail |
---|
boolean put(NodeHandle handle)
handle
- the handle to put.
NodeHandle get(Id nid)
nid
- a node id.
NodeHandle get(int i)
i
- an index.
boolean member(NodeHandle nh)
nid
- a node id.
NodeHandle remove(NodeHandle nh)
nid
- the node to remove.
int size()
size
in interface NodeHandleSet
int getIndex(Id nid) throws java.util.NoSuchElementException
nid
- the node id.
java.util.NoSuchElementException
int getIndex(NodeHandle nh) throws java.util.NoSuchElementException
java.util.NoSuchElementException
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |