Query Cycle Simulator HEADER

qcsim.net
Interface NetworkSimulator

All Known Implementing Classes:
PowerLawNetworkImpl

public interface NetworkSimulator

Network interface.

Version:
1.0
Author:
unascribed

Field Summary
static int MAX_TTL
           
static int MED_TTL
           
static int MIN_TTL
           
 
Method Summary
 void goodPeers(int nodes, int neighbors)
          Adds good peers to the network.
 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)
          Peer remote procedure call interface
 void send(int dest, PeerMessage msg)
          Send a message to a peer.
 int trustValueRequests()
          Total number of trust value request.
 

Field Detail

MAX_TTL

public static final int MAX_TTL
See Also:
Constant Field Values

MED_TTL

public static final int MED_TTL
See Also:
Constant Field Values

MIN_TTL

public static final int MIN_TTL
See Also:
Constant Field Values
Method Detail

trustValueRequests

public int trustValueRequests()
Total number of trust value request.


messages

public int messages()
The number of messages transfered during a simulated cycle.


send

public void send(int dest,
                 PeerMessage msg)
Send a message to a peer.

Parameters:
dest - destination peer id.
msg - message to send.

rpc

public double rpc(int dest,
                  PeerRPC cmd)
Peer remote procedure call interface

Parameters:
dest - Peer to execute rpc command.
cmd - command to execute.
Returns:
result of command execution.

goodPeers

public void goodPeers(int nodes,
                      int neighbors)
Adds good peers to the network.

Parameters:
nodes - number of nodes in network
neighbors - initial number of neighbors for each peer

highlyTrustedPeers

public void highlyTrustedPeers(int nodes,
                               int neighbors)
Adds highly trusted peers to the network.

Parameters:
nodes - number of peers to be connected
neighbors - number of initial neighbors

maliciousPeers

public void maliciousPeers(int nodes,
                           int neighbors)
Adds malicious peers to the network.

Parameters:
nodes - number of peers to be connected
neighbors - number of initial neighbors

Query Cycle Simulator HEADER