|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsuperpeer.RandomSpp
public class RandomSpp
| Field Summary | |
|---|---|
static java.lang.String |
PAR_ATTEMPTS
String name of the parameter |
static java.lang.String |
PAR_RATIO
String name of the parameter |
static java.lang.String |
PAR_SUPERPEERS
String name of the parameter |
static java.lang.String |
PAR_UNDERLOADED
String name of the parameter |
| Constructor Summary | |
|---|---|
RandomSpp(java.lang.String prefix)
|
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Just clones the object by calling super's clone() method. |
int |
degree()
|
int |
getCapacity()
|
peersim.core.Node |
getClient(int j)
|
peersim.core.Node |
getSuperpeer()
|
int |
getTarget()
|
double |
getValue()
|
boolean |
isSuperpeer()
|
void |
nextCycle(peersim.core.Node node,
int pid)
|
double |
ratio()
|
void |
setCapacity(int capacity)
|
void |
setValue(double capacity)
|
static void |
swapWithClient(peersim.core.Node nsmall,
RandomSpp small,
peersim.core.Node nsupernode,
RandomSpp supernode,
int client,
int pid)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PAR_UNDERLOADED
public static final java.lang.String PAR_SUPERPEERS
public static final java.lang.String PAR_ATTEMPTS
public static final java.lang.String PAR_RATIO
| Constructor Detail |
|---|
public RandomSpp(java.lang.String prefix)
| Method Detail |
|---|
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface peersim.core.Protocolclone in class java.lang.Objectjava.lang.CloneNotSupportedException
public void nextCycle(peersim.core.Node node,
int pid)
nextCycle in interface peersim.cdsim.CDProtocol
public static void swapWithClient(peersim.core.Node nsmall,
RandomSpp small,
peersim.core.Node nsupernode,
RandomSpp supernode,
int client,
int pid)
public boolean isSuperpeer()
isSuperpeer in interface Superpeerpublic peersim.core.Node getSuperpeer()
getSuperpeer in interface Superpeerpublic peersim.core.Node getClient(int j)
getClient in interface Superpeerpublic int degree()
degree in interface Superpeerpublic void setValue(double capacity)
setValue in interface peersim.vector.SingleValuepublic double getValue()
getValue in interface peersim.vector.SingleValuepublic void setCapacity(int capacity)
setCapacity in interface Superpeerpublic int getCapacity()
getCapacity in interface Superpeerpublic int getTarget()
getTarget in interface Superpeerpublic double ratio()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||