|
Query Cycle Simulator HEADER | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--qcsim.peer.impl.PeerManagerImpl
Creates and manage all peers in a simulation.
| Field Summary |
| Fields inherited from interface qcsim.peer.PeerManager |
MC_CHAIN, MC_CLIQUE, MC_RANDOM |
| Constructor Summary | |
PeerManagerImpl(Simulator simulator)
Constructor |
|
| Method Summary | |
void |
collective(java.util.Vector peers,
int ctype,
int type)
Create a collective. |
void |
contentManager(PeerContentManager manager)
Set the peer content manager |
void |
deletePeer(int peerID)
Removes peer from the system. |
int |
goodPeers()
Get the number of good peers in the system. |
int |
highlyTrustedPeers()
Get the number of highly trusted peers in the system. |
int |
maliciousPeers()
Get the number of malicious peers in the system. |
Peer |
newPeer(NetworkSimulator network,
int behavior)
Create a new peer |
Peer |
peer(int peerID)
Get peer |
int |
peers()
Number of peers in the system. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PeerManagerImpl(Simulator simulator)
simulator - Needed to obtain various simulation attributes.| Method Detail |
public int peers()
peers in interface PeerManagerpublic Peer peer(int peerID)
peer in interface PeerManagerpeerID - the peer id.
public Peer newPeer(NetworkSimulator network,
int behavior)
newPeer in interface PeerManagerbehavior - the peer's behavior/type
public void deletePeer(int peerID)
deletePeer in interface PeerManagerpeerID - the peer id.public int highlyTrustedPeers()
highlyTrustedPeers in interface PeerManagerpublic int maliciousPeers()
maliciousPeers in interface PeerManagerpublic int goodPeers()
goodPeers in interface PeerManagerpublic void contentManager(PeerContentManager manager)
PeerManager
contentManager in interface PeerManagermanager - the peer content manager.
public void collective(java.util.Vector peers,
int ctype,
int type)
collective in interface PeerManagerpeers - Vector of peerIDs who will be in the collectivectype - The type of collective to create.type - The type of trust value configuration.
|
Query Cycle Simulator HEADER | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||