Modifier and Type | Method and Description |
---|---|
void |
clear()
Remove all outstanding jobs from the queue.
|
void |
close()
Close this queue.
|
static JobQueueImpl |
createQueue(String name,
InternalQueueConfiguration config,
QueueServices services,
Set<String> topics)
Create a new queue.
|
InternalQueueConfiguration |
getConfiguration()
Return the queue configuration
|
String |
getName()
Get the name of the job queue.
|
Object |
getState(String key)
For monitoring purposes and possible extensions from the different
queue types.
|
String |
getStateInfo()
Return some information about the current state of the queue.
|
Statistics |
getStatistics()
Return statistics information about this queue.
|
boolean |
isSuspended()
Is the queue currently suspended?
|
void |
maintain()
Periodic maintenance
|
void |
outdate()
Outdate this queue.
|
void |
removeAll()
Remove all outstanding jobs and delete them.
|
void |
resume()
Resume a suspended queue.
|
void |
startJobs()
Start the job queue.
|
boolean |
stopJob(JobImpl job) |
void |
suspend()
Suspend the queue - when a queue is suspended it stops processing
jobs - however already started jobs are finished (but not rescheduled).
|
boolean |
tryToClose()
Check if the queue can be closed
|
void |
wakeUpQueue(Set<String> topics)
Inform the queue about new job for the given topics.
|
public static JobQueueImpl createQueue(String name, InternalQueueConfiguration config, QueueServices services, Set<String> topics)
name
- The queue nameconfig
- The queue configurationservices
- The queue servicestopics
- The topics handled by this queueJobQueueImpl
if there are jobs to process, null
otherwise.public InternalQueueConfiguration getConfiguration()
getConfiguration
in interface Queue
public String getName()
public Statistics getStatistics()
Queue
getStatistics
in interface Queue
Queue.getStatistics()
public void startJobs()
public void outdate()
public boolean tryToClose()
public void close()
public void maintain()
public void wakeUpQueue(Set<String> topics)
topics
- the new topicspublic void resume()
Queue
Queue.suspend()
. If the queue is not
suspended, calling this method has no effect.
Depending on the queue implementation, if a job failed a job queue might
sleep for a configured time, before a new job is processed. By calling this
method, the job queue can be woken up and force an immediate reprocessing.
This feature is only supported by ordered queues at the moment. If a queue
does not support this feature, calling this method has only an effect if
the queue is really suspended.resume
in interface Queue
Queue.resume()
public void suspend()
Queue
Queue.resume()
.suspend
in interface Queue
Queue.suspend()
public boolean isSuspended()
Queue
isSuspended
in interface Queue
Queue.isSuspended()
public void removeAll()
Queue
removeAll
in interface Queue
Queue.removeAll()
public void clear()
Queue
clear
in interface Queue
Queue.clear()
public Object getState(String key)
Queue
getState
in interface Queue
Queue.getState(java.lang.String)
public String getStateInfo()
Queue
getStateInfo
in interface Queue
Queue.getStateInfo()
public boolean stopJob(JobImpl job)
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.