|
Query Cycle Simulator HEADER | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--qcsim.net.impl.PowerLawNetworkImpl
Implements the network functionality.
| Field Summary |
| Fields inherited from interface qcsim.net.NetworkSimulator |
MAX_TTL, MED_TTL, MIN_TTL |
| Constructor Summary | |
PowerLawNetworkImpl(PeerManager manager)
|
|
| Method Summary | |
void |
goodPeers(int nodes,
int neighbors)
Creates power-law topology network of good peers. |
void |
highlyTrustedPeers(int nodes,
int neighbors)
Adds highly trusted peers to the network. |
void |
maliciousPeers(int nodes,
int neighbors)
Adds malicious peers to the network. |
int |
messages()
The number of messages transfered during a simulated cycle. |
double |
rpc(int dest,
PeerRPC cmd)
Send rpc command to peer |
void |
send(int dest,
PeerMessage msg)
Send a message to a peer. |
int |
trustValueRequests()
Total number of trust value request. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PowerLawNetworkImpl(PeerManager manager)
| Method Detail |
public int trustValueRequests()
NetworkSimulator
trustValueRequests in interface NetworkSimulatorpublic int messages()
NetworkSimulator
messages in interface NetworkSimulator
public void send(int dest,
PeerMessage msg)
send in interface NetworkSimulatordest - destination peer id.msg - message to send.
public double rpc(int dest,
PeerRPC cmd)
rpc in interface NetworkSimulatordest - Destination of rpc call.cmd - The remote procedure command.
public void goodPeers(int nodes,
int neighbors)
goodPeers in interface NetworkSimulatornodes - number of nodes in networkneighbors - initial number of neighbors for each peer
public void highlyTrustedPeers(int nodes,
int neighbors)
highlyTrustedPeers in interface NetworkSimulatornodes - number of peers to be connectedneighbors - number of initial neighbors
public void maliciousPeers(int nodes,
int neighbors)
maliciousPeers in interface NetworkSimulatornodes - number of peers to be connectedneighbors - number of initial neighbors
|
Query Cycle Simulator HEADER | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||