GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

resources::ResourceBroker Class Reference

An instance of this class is used to reserve resources. More...

Inheritance diagram for resources::ResourceBroker:

Inheritance graph
[legend]
Collaboration diagram for resources::ResourceBroker:

Collaboration graph
[legend]
List of all members.

Public Methods

ResourceBroker create (GATContext gatContext, Preferences preferences) throws Exception
 This method constructs a ResourceBroker instance corresponding to the passed GATContext.

boolean equals (Object object)
 Tests this ResourceBroker for equality with the passed Object.

abstract Reservation reserveResource (ResourceDescription resourceDescription, TimePeriod timePeriod) throws RemoteException, IOException
 This method attempts to reserve the specified resource for the specified time period.

abstract Reservation reserveResource (Resource resource, TimePeriod timePeriod) throws RemoteException, IOException
 This method attempts to reserve the specified resource for the specified time period.

abstract List findResources (ResourceDescription resourceDescription) throws RemoteException, IOException
 This method attempts to find one or more matching hardware resources.

abstract Job submitJob (JobDescription description) throws RemoteException, IOException
 This operation takes a JobDescription, and submits the specified job to some underlying resource management or allocation system.


Protected Methods

 ResourceBroker (GATContext gatContext, Preferences preferences) throws Exception
 This method constructs a ResourceBroker instance corresponding to the passed GATContext.


Protected Attributes

GATContext gatContext
Preferences preferences

Detailed Description

An instance of this class is used to reserve resources.

A resource can either be a hardware resource or a software resource. A software resource is simply an executable it makes little sense to reserve such. Thus an instance of this class can currently only reserve a hardware resource.

If one wishes to reserve a hardware resource, one must first describe the hardware resource that one wishes to reserve. This is accomplished by creating an instance of the class HardwareResourceDescription which describes the hardware resource that one wishes to reserve. After creating such an instance of the class HardwareResourceDescription that describes the hardware resource one wishes to reserve, one must specify the time period for which one wishes to reserve the hardware resource. This is accomplished by creating an instance of the class TimePeriod which specifies the time period for which one wishes to reserve the hardware resource. Finally, one must obtain a reservation for the desired hardware resource for the desired time period. This is accomplished by calling the method ReserveHardwareResource() on an instance of the class ResourceBroker with the appropriate instance of HardwareResourceDescription and the appropriate instance of TimePeriod.

In addition an instance of this class can be used to find hardware resources. This is accomplished using the method FindHardwareResources(). This is accomplished by creating an instance of the class HardwareResourceDescription which describes the hardware resource that one wishes to find. After creating such an instance of the class HardwareResourceDescription that describes the hardware resource one wishes to find, one must find the corresponding hardware resource. This is accomplished by calling the method FindHardwareResources() on an instance of the class ResourceBroker with the appropriate instance of HardwareResourceDescription.

Definition at line 45 of file ResourceBroker.java.


Constructor & Destructor Documentation

resources::ResourceBroker::ResourceBroker GATContext    gatContext,
Preferences    preferences
throws Exception [inline, protected]
 

This method constructs a ResourceBroker instance corresponding to the passed GATContext.

Parameters:
gatContext  A GATContext which will be used to broker resources
preferences  The Preferences for this instance
Exceptions:
java  .lang.Exception Thrown upon creation problems

Definition at line 62 of file ResourceBroker.java.

References resources::ResourceBroker::gatContext, and resources::ResourceBroker::preferences.


Member Function Documentation

ResourceBroker resources::ResourceBroker::create GATContext    gatContext,
Preferences    preferences
throws Exception [inline]
 

This method constructs a ResourceBroker instance corresponding to the passed GATContext.

Parameters:
gatContext  A GATContext which will be used to broker resources
preferences  The Preferences for this instance
Exceptions:
java  .lang.Exception Thrown upon creation problems

Definition at line 79 of file ResourceBroker.java.

References resources::ResourceBroker::gatContext, and resources::ResourceBroker::preferences.

boolean resources::ResourceBroker::equals Object    object [inline]
 

Tests this ResourceBroker for equality with the passed Object.

If the given object is not a ResourceBroker, then this method immediately returns false.

If the passed object is a ResourceBroker, then it is deemed equal if it has an equivalent GATContext, as determined by the Equals method on GATContext.

Parameters:
object  The Object to test for equality
Returns:
A boolean indicating equality

Definition at line 103 of file ResourceBroker.java.

References resources::ResourceBroker::gatContext.

abstract Reservation resources::ResourceBroker::reserveResource ResourceDescription    resourceDescription,
TimePeriod    timePeriod
throws RemoteException, IOException [pure virtual]
 

This method attempts to reserve the specified resource for the specified time period.

Upon reserving the specified resource this method returns a Reservation. Upon failing to reserve the specified resource this method returns an error.

Parameters:
resourceDescription  A description, a ResourceDescription, of the hardware resource to reserve
timePeriod  The time period, a TimePeriod , for which to reserve the hardware resource
Exceptions:
RemoteException  Thrown upon problems accessing the remote instance
java  .io.IOException Upon non-remote IO problem

abstract Reservation resources::ResourceBroker::reserveResource Resource    resource,
TimePeriod    timePeriod
throws RemoteException, IOException [pure virtual]
 

This method attempts to reserve the specified resource for the specified time period.

Upon reserving the specified resource this method returns a Reservation. Upon failing to reserve the specified resource this method returns an error.

Parameters:
resource  The resource to reserve.
timePeriod  The time period, a TimePeriod , for which to reserve the hardware resource
Exceptions:
RemoteException  Thrown upon problems accessing the remote instance
java  .io.IOException Upon non-remote IO problem

abstract List resources::ResourceBroker::findResources ResourceDescription    resourceDescription throws RemoteException, IOException [pure virtual]
 

This method attempts to find one or more matching hardware resources.

Upon finding the specified hardware resource(s) this method returns a java.util.List of HardwareResource instances. Upon failing to find the specified hardware resource this method returns an error.

Parameters:
resourceDescription  A description, a ResoucreDescription, of the resource(s) to find
Returns:
java.util.List of Resources upon success
Exceptions:
RemoteException  Thrown upon problems accessing the remote instance
java  .io.IOException Upon non-remote IO problem

abstract Job resources::ResourceBroker::submitJob JobDescription    description throws RemoteException, IOException [pure virtual]
 

This operation takes a JobDescription, and submits the specified job to some underlying resource management or allocation system.

On success, a GATJob instance is returned, which represents the job. Upon failing to submit the job, an error is issued.

Parameters:
description  The job description.
Returns:
Exceptions:
RemoteException  Thrown upon problems accessing the remote instance
IOException  Upon non-remote IO problem


Member Data Documentation

GATContext resources::ResourceBroker::gatContext [protected]
 

Definition at line 47 of file ResourceBroker.java.

Referenced by resources::ResourceBroker::create(), resources::ResourceBroker::equals(), resources::ResourceBroker::ResourceBroker(), and cpi::ResourceBrokerCpi::ResourceBrokerCpi().

Preferences resources::ResourceBroker::preferences [protected]
 

Definition at line 49 of file ResourceBroker.java.

Referenced by resources::ResourceBroker::create(), resources::ResourceBroker::ResourceBroker(), and cpi::ResourceBrokerCpi::ResourceBrokerCpi().


The documentation for this class was generated from the following file: