|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Node
Class that represents one node with a network address. An Network
is
made of a set of nodes. The functionality of this class is thin: it must be
able to represent failure states and store a list of protocols. It is the
protocols that do the interesting job.
Parameter Summary | |
---|---|
protocol
Prefix of the parameters that defines protocols. |
Field Summary |
---|
Fields inherited from interface peersim.core.Fallible |
---|
DEAD, DOWN, OK |
Method Summary | |
---|---|
java.lang.Object |
clone()
Clones the node. |
long |
getID()
Returns the unique ID of the node. |
int |
getIndex()
Returns the index of this node. |
Protocol |
getProtocol(int i)
Returns the i -th protocol in this node. |
int |
protocolSize()
Returns the number of protocols included in this node. |
void |
setIndex(int index)
Sets the index of this node in the internal representation of the node list. |
Methods inherited from interface peersim.core.Fallible |
---|
getFailState, isUp, setFailState |
Parameter Detail |
---|
protocol
Method Detail |
---|
Protocol getProtocol(int i)
i
-th protocol in this node. If i
is not a valid protocol id
(negative or larger than or equal to the number of protocols), then it throws
IndexOutOfBoundsException.
int protocolSize()
void setIndex(int index)
int getIndex()
Network.get(n.getIndex())
returns n. This index can
change during a simulation, it is not a fixed id. If you need that, use
getID()
.
Network.get(int)
long getID()
hashCode()
based on this ID.
java.lang.Object clone()
throws
clause.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |