org.objectweb.proactive.scheduler
Class RessourceManager

java.lang.Object
  extended by org.objectweb.proactive.scheduler.RessourceManager

public class RessourceManager
extends java.lang.Object

This is the class that is responsible for the "management" (allocation, disallocation ...) of the "ressources" (processing power).

Author:
cjarjouh

Constructor Summary
RessourceManager()
           
RessourceManager(BooleanWrapper b)
          the constructor of the class ...
 
Method Summary
 BooleanWrapper checkReservation(java.lang.String jobId)
           
 void freeNodes(java.lang.String jobId, boolean mainIsDead)
          frees the allocated nodes of the job associated to the specified jobId
 int getAvailableNodesNb()
          This method returns the number of ressources available.
 Node[] getNodes(java.lang.String jobId, int askedNodes)
          Returns all the nodes that were allocated to the job and moves them from the waiting queue to the used queue.
 BooleanWrapper isAvailable(int ressourceNumber)
          Tests the availlability of "ressourceNumber" of ressources.
 java.util.Vector nodes(java.lang.String nodeURL)
          Provides the information about the nodes (state, job running, properties ...)
 Node reserveNodes(java.lang.String jobId, int ressourceNumber)
          Reserve "ressourceNumber" of ressources and returns the first reserved node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RessourceManager

public RessourceManager()

RessourceManager

public RessourceManager(BooleanWrapper b)
the constructor of the class ... We don't use the constructor by default because of several problems of instanciation ...

Parameters:
b - nothing special
Method Detail

getAvailableNodesNb

public int getAvailableNodesNb()
This method returns the number of ressources available.

Returns:
the number of unallocated ressources.

freeNodes

public void freeNodes(java.lang.String jobId,
                      boolean mainIsDead)
frees the allocated nodes of the job associated to the specified jobId

Parameters:
jobId - the id of the job
mainIsDead - true if the main node is dead

reserveNodes

public Node reserveNodes(java.lang.String jobId,
                         int ressourceNumber)
Reserve "ressourceNumber" of ressources and returns the first reserved node.

Parameters:
ressourceNumber - is the number of ressources to be granted.
jobId - is the number of the job reserving these ressources

getNodes

public Node[] getNodes(java.lang.String jobId,
                       int askedNodes)
Returns all the nodes that were allocated to the job and moves them from the waiting queue to the used queue.

Parameters:
jobId - is the id of the job.

isAvailable

public BooleanWrapper isAvailable(int ressourceNumber)
Tests the availlability of "ressourceNumber" of ressources.

Parameters:
ressourceNumber - is the number of ressources needed.
Returns:
true if the amount is available, false otherwise.

nodes

public java.util.Vector nodes(java.lang.String nodeURL)
Provides the information about the nodes (state, job running, properties ...) Returns a vector of the nodes description

Returns:
information about the nodes in forms of a Vector and null if the node is not defined

checkReservation

public BooleanWrapper checkReservation(java.lang.String jobId)


Copyright 2001-2007 INRIA All Rights Reserved.