GridSim
v3.2

gridsim.index
Class AbstractGIS

Object
  extended byThread
      extended byeduni.simjava.Sim_entity
          extended bygridsim.GridSimCore
              extended bygridsim.index.AbstractGIS
All Implemented Interfaces:
Cloneable, Runnable
Direct Known Subclasses:
RegionalGIS

public abstract class AbstractGIS
extends GridSimCore

AbstractGIS is an abstract class which aims to provide skeletons for its chid classes to implement the required base functionalities of a regional GridInformationService (GIS).

Since:
GridSim Toolkit 3.2
Author:
Anthony Sulistio
Invariant:
$none

Field Summary
static int INQUIRY_GLOBAL_RESOURCE_AR_LIST
          Denotes a list of resources, which support advanced reservation, that are listed in other regional GIS entities.
static int INQUIRY_GLOBAL_RESOURCE_LIST
          Denotes a list of resources that are listed in other regional GIS entities.
static int INQUIRY_LOCAL_RESOURCE_AR_LIST
          Denotes a list of resources, that only support advance reservation, that are listed in this regional GIS entity.
static int INQUIRY_LOCAL_RESOURCE_LIST
          Denotes a list of all resources, including the ones that can support advance reservation, that are listed in this regional GIS entity.
static int INQUIRY_REGIONAL_GIS
          Denotes a list of regional GIS IDs, including this entity ID.
static int REGISTER_REGIONAL_GIS
          Registers this regional GIS to the GridInformationService or system GIS.
static int REGISTER_RESOURCE
          Denotes a grid resource to be registered to this regional GIS entity.
static int REGISTER_RESOURCE_AR
          Denotes a grid resource, that can support advance reservation, to be registered to this regional GIS entity.
protected  int SIZE
          Integer object size, including its overhead
protected  int systemGIS_
          System GIS or GridInformationService entity ID.
 
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
protected AbstractGIS(String name, Link link)
          Creates a new regional GIS entity
 
Method Summary
 void body()
          Handles incoming requests to this entity, DO NOT OVERRIDE this method.
protected  boolean notifySystemGIS(Sim_event ev, int tag)
          Notify GridInformationService or system GIS about a specific request as defined in the tag name.
protected abstract  void processEndSimulation()
          Informs the registered entities regarding to the end of a simulation.
protected abstract  void processGlobalResourceARList(Sim_event ev)
          Process an incoming request about getting a list of resource IDs supporting Advanced Reservation that are registered in other regional GIS entities.
protected abstract  void processGlobalResourceList(Sim_event ev)
          Process an incoming request about getting a list of resource IDs that are registered in other regional GIS entities.
protected abstract  void processInquiryRegionalGIS(Sim_event ev)
          Process an incoming request about getting a list of regional GIS IDs (including this entity ID), that are registered to the GridInformationService or system GIS.
protected abstract  void processOtherEvent(Sim_event ev)
          Process an incoming request that uses a user-defined tag.
protected abstract  void processRegisterResource(Sim_event ev)
          Process a registration request from a resource entity to this regional GIS entity.
protected abstract  void processRegisterResourceAR(Sim_event ev)
          Process a registration request from a resource entity supporting Advanced Reservation to this regional GIS entity.
protected abstract  void processResourceARList(Sim_event ev)
          Process an incoming request about getting a list of resource IDs supporting Advanced Reservation that are registered to this regional GIS entity.
protected abstract  void processResourceList(Sim_event ev)
          Process an incoming request about getting a list of resource IDs that are registered to this regional GIS entity.
protected abstract  void registerOtherEntity()
          Registers other information to GridInformationService or system GIS.
 
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
 

Field Detail

systemGIS_

protected int systemGIS_
System GIS or GridInformationService entity ID.


SIZE

protected final int SIZE
Integer object size, including its overhead

See Also:
Constant Field Values

REGISTER_REGIONAL_GIS

public static final int REGISTER_REGIONAL_GIS
Registers this regional GIS to the GridInformationService or system GIS.

See Also:
Constant Field Values

REGISTER_RESOURCE

public static final int REGISTER_RESOURCE
Denotes a grid resource to be registered to this regional GIS entity. This tag is similar to GridSimTags.REGISTER_RESOURCE.

See Also:
Constant Field Values

REGISTER_RESOURCE_AR

public static final int REGISTER_RESOURCE_AR
Denotes a grid resource, that can support advance reservation, to be registered to this regional GIS entity. This tag is similar to GridSimTags.REGISTER_RESOURCE_AR.

See Also:
Constant Field Values

INQUIRY_LOCAL_RESOURCE_LIST

public static final int INQUIRY_LOCAL_RESOURCE_LIST
Denotes a list of all resources, including the ones that can support advance reservation, that are listed in this regional GIS entity. This tag is similar to GridSimTags.RESOURCE_LIST.

See Also:
Constant Field Values

INQUIRY_LOCAL_RESOURCE_AR_LIST

public static final int INQUIRY_LOCAL_RESOURCE_AR_LIST
Denotes a list of resources, that only support advance reservation, that are listed in this regional GIS entity. This tag is similar to GridSimTags.RESOURCE_AR_LIST.

See Also:
Constant Field Values

INQUIRY_GLOBAL_RESOURCE_LIST

public static final int INQUIRY_GLOBAL_RESOURCE_LIST
Denotes a list of resources that are listed in other regional GIS entities.

See Also:
Constant Field Values

INQUIRY_GLOBAL_RESOURCE_AR_LIST

public static final int INQUIRY_GLOBAL_RESOURCE_AR_LIST
Denotes a list of resources, which support advanced reservation, that are listed in other regional GIS entities.

See Also:
Constant Field Values

INQUIRY_REGIONAL_GIS

public static final int INQUIRY_REGIONAL_GIS
Denotes a list of regional GIS IDs, including this entity ID.

See Also:
Constant Field Values
Constructor Detail

AbstractGIS

protected AbstractGIS(String name,
                      Link link)
               throws Exception
Creates a new regional GIS entity

Parameters:
name - this regional GIS name
link - a network link to this entity
Throws:
Exception - This happens when creating this entity before initializing GridSim package or this entity name is null or empty
Pre Condition:
name != null, link != null
Post Condition:
$none
Method Detail

body

public void body()
Handles incoming requests to this entity, DO NOT OVERRIDE this method. Implement the abstract methods instead.

Overrides:
body in class Sim_entity
Pre Condition:
$none
Post Condition:
$none

processGlobalResourceARList

protected abstract void processGlobalResourceARList(Sim_event ev)
Process an incoming request about getting a list of resource IDs supporting Advanced Reservation that are registered in other regional GIS entities.

Parameters:
ev - a Sim_event object (or an incoming event or request)
Pre Condition:
ev != null
Post Condition:
$none

processGlobalResourceList

protected abstract void processGlobalResourceList(Sim_event ev)
Process an incoming request about getting a list of resource IDs that are registered in other regional GIS entities.

Parameters:
ev - a Sim_event object (or an incoming event or request)
Pre Condition:
ev != null
Post Condition:
$none

processResourceList

protected abstract void processResourceList(Sim_event ev)
Process an incoming request about getting a list of resource IDs that are registered to this regional GIS entity.

Parameters:
ev - a Sim_event object (or an incoming event or request)
Pre Condition:
ev != null
Post Condition:
$none

processResourceARList

protected abstract void processResourceARList(Sim_event ev)
Process an incoming request about getting a list of resource IDs supporting Advanced Reservation that are registered to this regional GIS entity.

Parameters:
ev - a Sim_event object (or an incoming event or request)
Pre Condition:
ev != null
Post Condition:
$none

processRegisterResourceAR

protected abstract void processRegisterResourceAR(Sim_event ev)
Process a registration request from a resource entity supporting Advanced Reservation to this regional GIS entity.
NOTE: ev.get_data() should contain an Integer object representing the resource ID.

Parameters:
ev - a Sim_event object (or a registration request)
Pre Condition:
ev != null
Post Condition:
$none

processRegisterResource

protected abstract void processRegisterResource(Sim_event ev)
Process a registration request from a resource entity to this regional GIS entity.
NOTE: ev.get_data() should contain an Integer object representing the resource ID.

Parameters:
ev - a Sim_event object (or a registration request)
Pre Condition:
ev != null
Post Condition:
$none

processInquiryRegionalGIS

protected abstract void processInquiryRegionalGIS(Sim_event ev)
Process an incoming request about getting a list of regional GIS IDs (including this entity ID), that are registered to the GridInformationService or system GIS.

Parameters:
ev - a Sim_event object (or an incoming event or request)
Pre Condition:
ev != null
Post Condition:
$none

processOtherEvent

protected abstract void processOtherEvent(Sim_event ev)
Process an incoming request that uses a user-defined tag. This method is useful for creating a new regional GIS entity.

Parameters:
ev - a Sim_event object (or an incoming event or request)
Pre Condition:
ev != null
Post Condition:
$none

registerOtherEntity

protected abstract void registerOtherEntity()
Registers other information to GridInformationService or system GIS.

Pre Condition:
$none
Post Condition:
$none

processEndSimulation

protected abstract void processEndSimulation()
Informs the registered entities regarding to the end of a simulation.

Pre Condition:
$none
Post Condition:
$none

notifySystemGIS

protected boolean notifySystemGIS(Sim_event ev,
                                  int tag)
Notify GridInformationService or system GIS about a specific request as defined in the tag name.
NOTE: ev.get_data() should contain an Integer object

Parameters:
ev - a Sim_event object (or requests to be sent to system GIS)
tag - a tag name or type of request
Returns:
true if a request has been sent, false otherwise
Pre Condition:
ev != null
Post Condition:
$none

GridSim
v3.2

The University of Melbourne, Australia, 2005