org.gridbus.broker.farming.common
Class JobBuffer

java.lang.Object
  extended by org.gridbus.broker.farming.common.JobBuffer

public class JobBuffer
extends java.lang.Object

Author:
hag

Constructor Summary
JobBuffer()
           
 
Method Summary
 void clear()
          Clears the queue buffer
 java.util.Collection clear(boolean returnContent)
          Clears the queue buffer
 Job get()
          Gets next available Job off the queue buffer.
 java.util.Collection get(int count)
          Gets specified number of Jobs from the queue buffer
 int length()
          Returns the number of Jobs currently in the queue buffer.
 void put(java.util.Collection jobs)
          Put a group of jobs into the queue buffer
 void put(Job j)
          Puts a job into the queue buffer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobBuffer

public JobBuffer()
Method Detail

get

public Job get()
Gets next available Job off the queue buffer.

Returns:
null if no Jobs are currently buffered.

get

public java.util.Collection get(int count)
Gets specified number of Jobs from the queue buffer

Parameters:
count -
Returns:

put

public void put(Job j)
Puts a job into the queue buffer

Parameters:
j -

put

public void put(java.util.Collection jobs)
Put a group of jobs into the queue buffer

Parameters:
jobs -

clear

public java.util.Collection clear(boolean returnContent)
Clears the queue buffer

Parameters:
returnContent - if set to true will return queue buffer content prior to clearing
Returns:

clear

public void clear()
Clears the queue buffer


length

public int length()
Returns the number of Jobs currently in the queue buffer.

Returns: