Query Cycle Simulator HEADER

qcsim.impl
Class QueryCycleManagerImpl

java.lang.Object
  |
  +--qcsim.impl.QueryCycleManagerImpl
All Implemented Interfaces:
QueryCycleManager

public class QueryCycleManagerImpl
extends java.lang.Object
implements QueryCycleManager

Creates and initializes system components.

Version:
1.0
Author:
unascribed

Constructor Summary
QueryCycleManagerImpl()
          Constructor
 
Method Summary
 InitializationManager initializationManager()
          Get the initialization manager
 PeerDescription peer(int peerID)
          Get the peer description for peer with id peerID
 int peers()
          Get the number of peers in the system.
 QueryCycleManager reset()
          Reset the simulation.
 void save(java.lang.String filename)
          Save the current simulation
 Simulator simulator()
          Get the system simulator, used to update the current cycle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryCycleManagerImpl

public QueryCycleManagerImpl()
Constructor

Method Detail

initializationManager

public InitializationManager initializationManager()
Get the initialization manager

Specified by:
initializationManager in interface QueryCycleManager
Returns:
The initialization manager

simulator

public Simulator simulator()
Get the system simulator, used to update the current cycle.

Specified by:
simulator in interface QueryCycleManager
Returns:
the system simulator

peers

public int peers()
Get the number of peers in the system.

Specified by:
peers in interface QueryCycleManager
Returns:
the number of peers in the system.

peer

public PeerDescription peer(int peerID)
Get the peer description for peer with id peerID

Specified by:
peer in interface QueryCycleManager
Parameters:
peerID - the peer's id.
Returns:
the peer description.

save

public void save(java.lang.String filename)
Save the current simulation

Specified by:
save in interface QueryCycleManager
Parameters:
filename - file name to save simulation under

reset

public QueryCycleManager reset()
Reset the simulation.

Specified by:
reset in interface QueryCycleManager
Returns:
A new manager that will replay the current simulation.

Query Cycle Simulator HEADER