org.gridbus.broker.farming.common.queues
Class QueueManager

java.lang.Object
  extended by org.gridbus.broker.farming.common.queues.QueueManager
Direct Known Subclasses:
QueueManagerPBS, QueueManagerSGE

public abstract class QueueManager
extends java.lang.Object

Author:
hag

Constructor Summary
QueueManager()
           
 
Method Summary
 void addQueue(JobQueue q)
           
 JobQueue bestQueue()
           
abstract  void discover()
           
 java.util.Collection getQueues()
           
 boolean hasQueues()
           
 void setQueues(java.util.Collection qs)
           
abstract  void update()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueueManager

public QueueManager()
Method Detail

update

public abstract void update()

discover

public abstract void discover()

setQueues

public void setQueues(java.util.Collection qs)
Parameters:
qs -

hasQueues

public boolean hasQueues()
Returns:

getQueues

public java.util.Collection getQueues()
Returns:

addQueue

public void addQueue(JobQueue q)
Parameters:
q -

bestQueue

public JobQueue bestQueue()
Returns:
See Also:
round robin but also checking whether slots are available. If not slots available then check the next queue. will return null if no queue is ready for jobs. note: make sure limit is > 1 or else nothing will be run.