| Constructor and Description | 
|---|
JobStack(int maxSize,
        JobRepository repo)  | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
addJob(JobSpec spec)
Persists a  
JobSpec to the queue. | 
int | 
getCapacity()
Gets the max number of jobs allowed in
 queue at any given time 
 | 
JobRepository | 
getJobRepository()
 | 
JobSpec | 
getNextJob()
Gets the next  
JobSpec from the queue, and correspondingly removes
 it from persitance. | 
List | 
getQueuedJobs()
 | 
int | 
getSize()
Gets the number of jobs in queue 
 | 
boolean | 
isEmpty()
Returns a boolean value representing whether or not the queue is empty. 
 | 
void | 
purge()
Purges all  
JobSpecs from the queue. | 
String | 
requeueJob(JobSpec spec)
Re-adds a  
JobSpec to the back of the queue. | 
public JobStack(int maxSize,
                JobRepository repo)
public String addJob(JobSpec spec) throws JobQueueException
JobQueueJobSpec to the queue.addJob in interface JobQueuespec - The JobSpec to persist.JobQueueException - If there is any error queueing the JobSpec.public String requeueJob(JobSpec spec) throws JobQueueException
JobQueueJobSpec to the back of the queue.requeueJob in interface JobQueuespec - The JobSpec to re-add.JobQueueException - If there is any error requeueing the JobSpec.public List getQueuedJobs()
JobQueuegetQueuedJobs in interface JobQueueList of queued JobSpecs.public void purge()
JobQueueJobSpecs from the queue.public boolean isEmpty()
JobQueuepublic JobSpec getNextJob()
JobQueueJobSpec from the queue, and correspondingly removes
 it from persitance.getNextJob in interface JobQueueJobSpec from the queue.public JobRepository getJobRepository()
JobQueuegetJobRepository in interface JobQueueJobRepository.public int getCapacity()
JobQueuegetCapacity in interface JobQueueCopyright © 1999–2017 Apache OODT. All rights reserved.