|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpeersim.core.OracleIdleProtocol
public final class OracleIdleProtocol
A protocol that does nothing but knows everything. It provides an interface which models a protocol that knows all nodes in the network, i.e. the neighborhood set of this protocol is always the whole node set. this protocol is also extremely cheap, in fact it has no data fields.
| Constructor Summary | |
|---|---|
OracleIdleProtocol(java.lang.String prefix)
Does nothing |
|
| Method Summary | |
|---|---|
boolean |
addNeighbor(Node n)
Unsupported operation |
java.lang.Object |
clone()
Returns this to maximize memory saving. |
boolean |
contains(Node n)
This is an expensive operation, should not be used at all. |
int |
degree()
Returns the size of the neighbor list. |
Node |
getNeighbor(int i)
The neighborhood contains the node itself, ie it contains the loop edge. |
void |
onKill()
Performs cleanup when removed from the network. |
void |
pack()
A possibility for optimization. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OracleIdleProtocol(java.lang.String prefix)
| Method Detail |
|---|
public java.lang.Object clone()
clone in interface Protocolclone in class java.lang.Objectpublic boolean contains(Node n)
contains in interface Linkablepublic boolean addNeighbor(Node n)
addNeighbor in interface Linkablepublic Node getNeighbor(int i)
getNeighbor in interface Linkablepublic int degree()
Linkable
degree in interface Linkablepublic void pack()
Linkable
pack in interface Linkablepublic void onKill()
CleanableFallible.DEAD.
It is very important that after calling this method, NONE of the methods
of the implementing object are guaranteed to work any longer.
They might throw arbitrary exceptions, etc. The idea is that after
calling this, typically no one should access this object.
However, as a recommendation, at least toString should be guaranteed to
execute normally, to aid debugging.
onKill in interface Cleanablepublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||