public abstract class AbstractTaskQueue extends Object implements TaskQueue
| Modifier and Type | Field and Description |
|---|---|
protected FifoBuffer<Task> |
buffer |
| Constructor and Description |
|---|
AbstractTaskQueue(FifoBuffer<Task> buffer) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTask(Task task)
Adds a task to the end of the queue
|
void |
clear()
Throw away all the tasks in the queue
|
void |
flush()
Will execute every task in the queue
|
Timestamp |
getFlushStarted()
Obtains the time when the queue started flushing.
|
Collection<Task> |
getQueue()
Deprecated.
use getTasks() instead.
|
Collection<Task> |
getTasks()
Get a Collection of the Tasks currently in the queue
|
protected void |
handleException(Task task,
Exception e) |
boolean |
isFlushing()
Returns true if the queue is currently flushing or false otherwise
|
int |
size()
Obtains the current size of the queue
|
protected FifoBuffer<Task> buffer
public AbstractTaskQueue(FifoBuffer<Task> buffer)
public void flush()
TaskQueuepublic int size()
TaskQueuepublic void addTask(Task task)
TaskQueuepublic Collection<Task> getQueue()
public boolean isFlushing()
TaskQueueisFlushing in interface TaskQueuepublic Timestamp getFlushStarted()
TaskQueuegetFlushStarted in interface TaskQueuepublic void clear()
TaskQueuepublic Collection<Task> getTasks()
TaskQueueCopyright © 2003–2017 Atlassian. All rights reserved.