com.atlassian.core.task
Interface TaskQueue

All Known Subinterfaces:
TaskQueueWithErrorQueue
All Known Implementing Classes:
AbstractErrorQueuedTaskQueue, AbstractTaskQueue, DefaultTaskQueue, ErrorQueuedTaskQueue

public interface TaskQueue

Represents a queue of Task objects. Arbitary task objects can be queue and then flushed when necessary. The flush will cause all tasks in the queue to execute.

Author:
Ross Mason
See Also:
Task

Method Summary
 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
 java.sql.Timestamp getFlushStarted()
          Obtains the time when the queue started flushing.
 java.util.Collection getTasks()
          Get a Collection of the Tasks currently in the queue
 boolean isFlushing()
          Returns true if the queue is currently flushing or false otherwise
 int size()
          Obtains the current size of the queue
 

Method Detail

flush

void flush()
Will execute every task in the queue


size

int size()
Obtains the current size of the queue

Returns:
the queue size

addTask

void addTask(Task task)
Adds a task to the end of the queue

Parameters:
task - the task to add

isFlushing

boolean isFlushing()
Returns true if the queue is currently flushing or false otherwise

Returns:
true if the queue is currently flushing or false otherwise

getFlushStarted

java.sql.Timestamp getFlushStarted()
Obtains the time when the queue started flushing. This returns null if the queue is not being flushed

Returns:
the time when the queue started flushing

clear

void clear()
Throw away all the tasks in the queue


getTasks

java.util.Collection getTasks()
Get a Collection of the Tasks currently in the queue



Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.