com.abiquo.ResourceIterator Class Reference

This class allows to iterate over the resource ranking made by the scheduler. More...

Inherits Iterator.

List of all members.

Public Member Functions

String getResourceName ()
 Gets the resource name.
boolean hasNext ()
 Always returns true, so, always there are a "best" resource candidate.
ResourceInstance next ()
 Iterator basic method.
void remove ()
 Have no sense to remove a candidate.
void setResourceName (String inResourceName)
 Sets a new resource name to iterate over.

Protected Member Functions

 ResourceIterator (GridResourceProvider inGrid, String inResourceName)
 Constructed from Grid.


Detailed Description

This class allows to iterate over the resource ranking made by the scheduler.

Used to have different sources taking shared resources.

When using this resource provider the allocation can be on demand.

It has no end. hasNext always return true, (always there are a best resource)


Constructor & Destructor Documentation

com.abiquo.ResourceIterator.ResourceIterator ( GridResourceProvider  inGrid,
String  inResourceName 
) [protected]

Constructed from Grid.

Parameters:
inGrid the grid resource provider used
inResourceName the resource name we want to iterate
Todo:
assure almost one node can instantiate "ResouceName"


Member Function Documentation

String com.abiquo.ResourceIterator.getResourceName (  ) 

Gets the resource name.

Returns:
the resource name

boolean com.abiquo.ResourceIterator.hasNext (  ) 

Always returns true, so, always there are a "best" resource candidate.

Returns:
true

ResourceInstance com.abiquo.ResourceIterator.next (  ) 

Iterator basic method.

Wait almost "BACKOF" between calls.

Returns:
the best resource instance candidate
See also:
com.abiquo.GridResourceProvider.getResource

void com.abiquo.ResourceIterator.setResourceName ( String  inResourceName  ) 

Sets a new resource name to iterate over.

Parameters:
inResourceName the new supplied resource name
Todo:
assure almost one node can instantiate "ResouceName"


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

Generated on Mon Sep 15 20:13:10 2008 for FrameworkAPI by  doxygen 1.5.5