GridSim
v3.3

gridsim
Class ARGridResource

Object
  extended byThread
      extended byeduni.simjava.Sim_entity
          extended bygridsim.GridSimCore
              extended bygridsim.GridResource
                  extended bygridsim.ARGridResource
All Implemented Interfaces:
Cloneable, Runnable

public class ARGridResource
extends GridResource

ARGridResource class handles all Advanced Reservation functionalities. All the functionalities are done by its internal or private methods.
NOTE: It is important to set the allocation policy inside ResourceCharacteristics object into ResourceCharacteristics.ADVANCE_RESERVATION. In addition, a resource's scheduler should be extending from ARPolicy class.

Since:
GridSim Toolkit 3.0
Author:
Anthony Sulistio
See Also:
GridResource, GridSim, ResourceCharacteristics, AllocPolicy, ARPolicy
Invariant:
$none

Field Summary
 
Fields inherited from class gridsim.GridResource
policy_, policyType_, regionalGISName_, resCalendar_, resource_, SIZE
 
Fields inherited from class gridsim.GridSimCore
input, output
 
Fields inherited from class eduni.simjava.Sim_entity
 
Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ARGridResource(String name, double baud_rate, ResourceCharacteristics resource, ResourceCalendar calendar, ARPolicy policy)
          Allocates a new GridResource object that supports Advanced Reservation.
ARGridResource(String name, Link link, ResourceCharacteristics resource, ResourceCalendar calendar, ARPolicy policy)
          Allocates a new GridResource object that supports Advanced Reservation.
 
Method Summary
protected  void processOtherEvent(Sim_event ev)
          Processes other events or services related to Advanced Reservations.
 
Methods inherited from class gridsim.GridResource
body, registerOtherEntity, setRegionalGIS, setRegionalGIS, SpaceShare_AllocatePEtoGridlet, spaceShared_AllocatePEtoGridlet
 
Methods inherited from class gridsim.GridSimCore
finalize, finalizeGridSimulation, getLink, getPingResult, isNetworked, IsNetworked, ping, ping, ping, ping, pingBlockingCall, pingBlockingCall, pingBlockingCall, pingBlockingCall, send, Send, send, Send, send, Send, send, Send, send, Send, send, Send, setBackgroundTraffic, setBackgroundTraffic, TerminateInputOutputEntities, terminateIOEntities
 
Methods inherited from class eduni.simjava.Sim_entity
add_generator, add_param, add_port, clone, get_id, get_name, get_port, get_port, get_stat, run, send_on, set_invisible, set_stat, sim_cancel, sim_completed, sim_current, sim_get_next, sim_get_next, sim_hold_for, sim_hold, sim_pause_for, sim_pause_for, sim_pause_until, sim_pause_until, sim_pause, sim_process_for, sim_process_for, sim_process_until, sim_process_until, sim_process, sim_putback, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_select, sim_trace, sim_wait_for, sim_wait_for, sim_wait_for, sim_wait, sim_waiting, sim_waiting
 
Methods inherited from class 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 Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ARGridResource

public ARGridResource(String name,
                      double baud_rate,
                      ResourceCharacteristics resource,
                      ResourceCalendar calendar,
                      ARPolicy policy)
               throws Exception
Allocates a new GridResource object that supports Advanced Reservation.

Parameters:
name - the name to be associated with this entity (as required by Sim_entity class from simjava package)
baud_rate - network communication or bandwidth speed
resource - an object of ResourceCharacteristics
calendar - an object of ResourceCalendar
policy - a scheduler for this Grid resource. The scheduler should be able to handle Advanced Reservations.
Throws:
Exception - This happens when one of the following scenarios occur:
See Also:
AllocPolicy, GridSim.init(int, Calendar, boolean, String[], String[], String), GridSim.init(int, Calendar, boolean)
Pre Condition:
$none
Post Condition:
$none

ARGridResource

public ARGridResource(String name,
                      Link link,
                      ResourceCharacteristics resource,
                      ResourceCalendar calendar,
                      ARPolicy policy)
               throws Exception
Allocates a new GridResource object that supports Advanced Reservation.

Parameters:
name - the name to be associated with this entity (as required by Sim_entity class from simjava package)
link - the link that will be used to connect this ARGridResource to another Entity or Router.
resource - an object of ResourceCharacteristics
calendar - an object of ResourceCalendar
policy - a scheduler for this Grid resource. The scheduler should be able to handle Advanced Reservations.
Throws:
Exception - This happens when one of the following scenarios occur:
See Also:
AllocPolicy, GridSim.init(int, Calendar, boolean, String[], String[], String), GridSim.init(int, Calendar, boolean)
Pre Condition:
$none
Post Condition:
$none
Method Detail

processOtherEvent

protected void processOtherEvent(Sim_event ev)
Processes other events or services related to Advanced Reservations. This method overrides from a parent class.

The services or tags available for this resource are:

Overrides:
processOtherEvent in class GridResource
Parameters:
ev - a Sim_event object
See Also:
GridResource.processOtherEvent(Sim_event)
Pre Condition:
ev != null
Post Condition:
$none

GridSim
v3.3

The University of Melbourne, Australia, 2005