|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--eduni.simjava.Sim_entity | +--gridsim.GridSim
The top most GridSim class that all GridSim entities need to extend to become concurrent entities. They automatically inherit all properties of entity which extends thread class. All entities extending GridSim should defined a body() method inwhich entitity actions (e.g., raising, processing, and receiveing events to communicate with other entities) are performed. When the execution of an entity is initiated by Start method, the method body() is automatically invoked by entity thread. Entities should exit body() method when there are no more interested in handling events.
Field Summary | |
protected eduni.simjava.Sim_port |
input
|
protected eduni.simjava.Sim_port |
output
|
static gridsim.GridSimRandom |
rand
|
static java.util.Date |
SimulationStartDate
|
Fields inherited from class eduni.simjava.Sim_entity |
|
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
GridSim(java.lang.String name)
Entity WITHOUT NETWORK communication channels: "input" and "output" Sim_port. |
|
GridSim(java.lang.String name,
double baud_rate)
Entitity with NETWORK communication channels: "input" and "output" Sim_port |
Method Summary | |
static double |
Clock()
Get Current Simulation Time. |
protected void |
finalize()
Invoked by the garbage collector to clearn up any data |
static int |
GetEntityId(java.lang.String EntityName)
It returns ID (int value) of the Entity given its name |
java.lang.String |
GetEntityName()
Returns the name of the current entity |
static java.lang.String |
GetEntityName(int EntityID)
Returns name of the entity given its Entity ID |
java.util.LinkedList |
GetGridResourceList()
It send sends a request to GIS entity to get the list of Grid resources. |
gridsim.ResourceCharacteristics |
GetResourceCharacteristics(int resource_id)
Get Resource Characteristics. |
gridsim.Accumulator |
GetResourceDynamicInformation(int resource_id)
Get Resource Dynamic Information |
static java.util.Date |
GetSimulationStartDate()
|
static int |
GridInformationServiceEntityId()
It returns ID of the Entity named "GridInformationService" |
protected void |
GridletCancel(gridsim.Gridlet gl,
int resource_id)
|
protected gridsim.Gridlet |
GridletReceive()
|
protected void |
GridletSubmit(gridsim.Gridlet gl,
int resource_id)
|
void |
GridSimHold(double duration)
Causes the entity to hold for duration units of simulation time. |
static int |
GridSimShutdownEntityId()
It returns ID of Entity named "GridSimShutdown" |
static int |
GridStatisticsEntityId()
It returns ID of the Entity named "GridStatistics" |
static void |
Init(int no_of_users,
java.util.Calendar cal,
boolean traceFlag,
java.lang.String[] exclude_from_file,
java.lang.String[] exclude_from_processing,
java.lang.String ReportWriterName)
Initialise GridSim Parameters. |
boolean |
IsNetworked()
Check type of entity |
protected java.lang.Object |
ReceiveEventObject()
|
protected java.lang.Object |
ReceiveEventObject(eduni.simjava.Sim_port source_port)
|
void |
RecordStatistics(java.lang.String category,
boolean data)
|
void |
RecordStatistics(java.lang.String category,
double data)
|
void |
RecordStatistics(java.lang.String category,
int data)
|
void |
RecordStatistics(java.lang.String category,
java.lang.String data)
|
protected void |
Send(int EntityID,
double delay,
int GridSimTag)
|
protected void |
Send(int EntityID,
double delay,
int GridSimTag,
java.lang.Object data)
|
protected void |
Send(eduni.simjava.Sim_port dest_port,
double delay,
int GridSimTag)
|
protected void |
Send(eduni.simjava.Sim_port dest_port,
double delay,
int GridSimTag,
java.lang.Object data)
|
protected void |
Send(java.lang.String EntityName,
double delay,
int GridSimTag)
Send Event/Message to Entity by 'delay' simulation time from now with user-defined tag representing the type of event. |
protected void |
Send(java.lang.String EntityName,
double delay,
int GridSimTag,
java.lang.Object data)
|
protected void |
ShutdownGridStatisticsEntity()
This method should be invoked by User Defined ReportWriter if report writter is NOY defined (null) during Init, then GridSimShutDown will invoke it |
protected void |
ShutdownUserEntity()
This should be invoved by all User Entities. |
static void |
Start()
Start the execution of GridSim simulation. |
static void |
Stop()
Stop Grid Simulation. |
protected void |
TerminateInputOutputEntities()
It termindates Entities managing NETWORK communication channels Can be invoked explicity to shutdown NETWORK communication channels. |
Methods inherited from class eduni.simjava.Sim_entity |
add_param, add_port, body, get_id, get_name, get_port, get_port, run, send_on, set_invisible, sim_cancel, sim_current, sim_get_next, sim_get_next, sim_hold_for, sim_hold, sim_putback, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_select, sim_trace, sim_wait_for, sim_wait, sim_waiting, sim_waiting |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected eduni.simjava.Sim_port input
protected eduni.simjava.Sim_port output
public static java.util.Date SimulationStartDate
public static gridsim.GridSimRandom rand
Constructor Detail |
public GridSim(java.lang.String name)
public GridSim(java.lang.String name, double baud_rate)
Method Detail |
protected void TerminateInputOutputEntities()
protected void finalize()
finalize
in class java.lang.Object
public boolean IsNetworked()
public static java.util.Date GetSimulationStartDate()
public static void Init(int no_of_users, java.util.Calendar cal, boolean traceFlag, java.lang.String[] exclude_from_file, java.lang.String[] exclude_from_processing, java.lang.String ReportWriterName)
no_of_users
- The number of User Entities created. This parameters indicates that
GridSimShutdown first waits for User Entities's END_OF_SIMULATION signal before issuing
terminate singal to other entities.cal
- The calender object for storing peaktime, holiday, etc. timetraceFlag
- true if GridSim trace need to be written.exclude_from_file
- exclude_from_processing
- ReportWriterName
- The name of the entities which is signaled to write
write any specific report just before termination of the simulation.public static void Start()
public static double Clock()
public void GridSimHold(double duration)
duration
- The amount of time to hold.public static void Stop()
protected void Send(java.lang.String EntityName, double delay, int GridSimTag)
EntityName
- The name of the destination entitydelay
- How long from the current simulation time the event/message should be deliveredGridSimTag
- An user-defined number representing the type of event/messageprotected void Send(java.lang.String EntityName, double delay, int GridSimTag, java.lang.Object data)
protected void Send(int EntityID, double delay, int GridSimTag)
protected void Send(int EntityID, double delay, int GridSimTag, java.lang.Object data)
protected void Send(eduni.simjava.Sim_port dest_port, double delay, int GridSimTag)
protected void Send(eduni.simjava.Sim_port dest_port, double delay, int GridSimTag, java.lang.Object data)
protected java.lang.Object ReceiveEventObject()
protected java.lang.Object ReceiveEventObject(eduni.simjava.Sim_port source_port)
protected void GridletSubmit(gridsim.Gridlet gl, int resource_id)
protected gridsim.Gridlet GridletReceive()
protected void GridletCancel(gridsim.Gridlet gl, int resource_id)
public java.lang.String GetEntityName()
public static java.lang.String GetEntityName(int EntityID)
public static int GetEntityId(java.lang.String EntityName)
public static int GridStatisticsEntityId()
public static int GridInformationServiceEntityId()
public static int GridSimShutdownEntityId()
protected void ShutdownUserEntity()
protected void ShutdownGridStatisticsEntity()
public java.util.LinkedList GetGridResourceList()
public gridsim.ResourceCharacteristics GetResourceCharacteristics(int resource_id)
resource_id
- The resource id
public gridsim.Accumulator GetResourceDynamicInformation(int resource_id)
resource_id
- The resource id
public void RecordStatistics(java.lang.String category, double data)
public void RecordStatistics(java.lang.String category, int data)
public void RecordStatistics(java.lang.String category, java.lang.String data)
public void RecordStatistics(java.lang.String category, boolean data)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |