|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeersim.dynamics.WireGraph
public abstract class WireGraph
This class is the superclass of classes that
takes a Linkable
protocol or a graph and add edges that define a
certain topology.
Note that no connections are removed, they are only added. So it can be used
in combination with other initializers.
Parameter Summary | |
---|---|
protocol
The Linkable protocol to operate on. |
|
pack
If this config property is defined, method Linkable.pack() is
invoked on the specified protocol at the end of the wiring phase. |
|
undir
If set, the generated graph is undirected. |
|
undirected
Alias for "undir". |
Field Summary | |
---|---|
Graph |
g
If set (not null), this is the graph to wire. |
protected int |
pid
The protocol we want to wire. |
boolean |
undir
If true, edges are added in an undirected fashion. |
Constructor Summary | |
---|---|
protected |
WireGraph(java.lang.String prefix)
Standard constructor that reads the configuration parameters. |
Method Summary | |
---|---|
boolean |
execute()
Calls method wire(peersim.graph.Graph) with the graph g ,
or if null, on the overlay specified by the protocol given by config
parameter "protocol". |
abstract void |
wire(Graph g)
The method that should wire (add edges to) the given graph. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Parameter Detail |
---|
protocol
Linkable
protocol to operate on. If it is not specified,
then operates on g
. If g
is null, execute()
throws
an Exception. Note that if g
is set, it will be used irrespective
of the setting of the protocol in this field.
pack
Linkable.pack()
is
invoked on the specified protocol at the end of the wiring phase.
Default to false.
undir
undirected
Field Detail |
---|
protected final int pid
g
).
public final boolean undir
public Graph g
execute()
is called, as specified by "protocol".
Constructor Detail |
---|
protected WireGraph(java.lang.String prefix)
prefix
- the configuration prefix for this classMethod Detail |
---|
public final boolean execute()
wire(peersim.graph.Graph)
with the graph g
,
or if null, on the overlay specified by the protocol given by config
parameter "protocol". If neither g
, nor "protocol"
is set, throws a RuntimException.
execute
in interface Control
public abstract void wire(Graph g)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |