gridsim
Class GridInformationService

Object
  extended byThread
      extended byeduni.simjava.Sim_entity
          extended bygridsim.GridSim
              extended bygridsim.GridInformationService
All Implemented Interfaces:
Cloneable, Runnable

public class GridInformationService
extends GridSim

A Grid Information Service (GIS) is a GridSim entity that provides Grid resource registration, indexing and discovery services. The Grid resources register their readiness to process Gridlets by registering themselves with this entity.

Other entities such as the resource broker can contact this class for resource discovery service, which returns a list of registered resource entities and their contact address. For example, scheduling entities use this service for resource discovery.

In summary, it acts like a yellow page service.

Version:
2.2, December 2003
Author:
Manzur Murshed and Rajkumar Buyya
Invariant:
$none

Field Summary
 
Fields inherited from class gridsim.GridSim
input, output, rand, SimulationStartDate
 
Fields inherited from class eduni.simjava.Sim_entity
 
Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
GridInformationService(String name, double baud_rate)
          Allocates a new GridInformationService object with networked I/O ports
 
Method Summary
 void body()
          A method that gets one event at a time, and serves it based on its request.
 LinkedList getList()
          Gets the list of GridResource entity
 boolean isResourceExist(int id)
          Checks whether the given GridResource ID exists or not
 
Methods inherited from class gridsim.GridSim
clock, Clock, finalize, finalizeGridSimulation, getEntityId, GetEntityId, getEntityName, GetEntityName, getEntityName, GetEntityName, getGridInfoServiceEntityId, getGridResourceList, GetGridResourceList, getGridSimShutdownEntityId, getGridStatisticsEntityId, getResourceCharacteristics, GetResourceCharacteristics, getResourceDynamicInfo, GetResourceDynamicInformation, getSimulationCalendar, getSimulationStartDate, GetSimulationStartDate, GridInformationServiceEntityId, gridletCancel, gridletCancel, gridletMove, gridletMove, gridletPause, gridletPause, gridletReceive, GridletReceive, gridletResume, gridletResume, gridletStatus, gridletStatus, gridletSubmit, GridletSubmit, gridletSubmit, gridSimHold, GridSimHold, GridSimShutdownEntityId, GridStatisticsEntityId, init, Init, isNetworked, IsNetworked, receiveEventObject, ReceiveEventObject, receiveEventObject, ReceiveEventObject, recordStatistics, RecordStatistics, recordStatistics, RecordStatistics, recordStatistics, RecordStatistics, recordStatistics, RecordStatistics, send, Send, send, Send, send, Send, send, Send, send, Send, send, Send, shutdownGridStatisticsEntity, ShutdownGridStatisticsEntity, shutdownUserEntity, ShutdownUserEntity, Start, startGridSimulation, Stop, stopGridSimulation, 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

GridInformationService

public GridInformationService(String name,
                              double baud_rate)
                       throws Exception
Allocates a new GridInformationService object with networked I/O ports

Parameters:
name - the name to be associated with this entity (as required by Sim_entity class from simjava package)
baud_rate - communication speed
Throws:
Exception - This happens when creating this entity before initializing GridSim package or this entity name is null or empty
See Also:
GridSim.init(int, Calendar, boolean, String[], String[], String), Sim_entity
Pre Condition:
name != null, baud_rate > 0.0
Post Condition:
$none
Method Detail

body

public void body()
A method that gets one event at a time, and serves it based on its request.

The services available to other GridSim entities are:

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

getList

public LinkedList getList()
Gets the list of GridResource entity

Returns:
a LinkedList object of GridResource entity
Pre Condition:
$none
Post Condition:
$none

isResourceExist

public boolean isResourceExist(int id)
Checks whether the given GridResource ID exists or not

Parameters:
id - a GridResource id
Returns:
true if the given ID exists, false otherwise
Pre Condition:
id >= 0
Post Condition:
$none