com.atlassian.core.task
Class AbstractTaskQueue

java.lang.Object
  extended by com.atlassian.core.task.AbstractTaskQueue
All Implemented Interfaces:
TaskQueue
Direct Known Subclasses:
AbstractErrorQueuedTaskQueue, DefaultTaskQueue

public abstract class AbstractTaskQueue
extends java.lang.Object
implements TaskQueue

Created by IntelliJ IDEA. User: Tomd Date: 26/04/2006 Time: 11:17:36 To change this template use File | Settings | File Templates.


Field Summary
protected  FifoBuffer buffer
           
 
Constructor Summary
AbstractTaskQueue(FifoBuffer buffer)
           
 
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 getQueue()
          Deprecated. use getTasks() instead.
 java.util.Collection getTasks()
          Get a Collection of the Tasks currently in the queue
protected  void handleException(Task task, java.lang.Exception e)
           
 boolean isFlushing()
          Returns true if the queue is currently flushing or false otherwise
 int size()
          Obtains the current size of the queue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

protected FifoBuffer buffer
Constructor Detail

AbstractTaskQueue

public AbstractTaskQueue(FifoBuffer buffer)
Method Detail

flush

public void flush()
Description copied from interface: TaskQueue
Will execute every task in the queue

Specified by:
flush in interface TaskQueue

handleException

protected void handleException(Task task,
                               java.lang.Exception e)

size

public int size()
Description copied from interface: TaskQueue
Obtains the current size of the queue

Specified by:
size in interface TaskQueue
Returns:
the queue size

addTask

public void addTask(Task task)
Description copied from interface: TaskQueue
Adds a task to the end of the queue

Specified by:
addTask in interface TaskQueue
Parameters:
task - the task to add

getQueue

public java.util.Collection getQueue()
Deprecated. use getTasks() instead.


isFlushing

public boolean isFlushing()
Description copied from interface: TaskQueue
Returns true if the queue is currently flushing or false otherwise

Specified by:
isFlushing in interface TaskQueue
Returns:
true if the queue is currently flushing or false otherwise

getFlushStarted

public java.sql.Timestamp getFlushStarted()
Description copied from interface: TaskQueue
Obtains the time when the queue started flushing. This returns null if the queue is not being flushed

Specified by:
getFlushStarted in interface TaskQueue
Returns:
the time when the queue started flushing

clear

public void clear()
Description copied from interface: TaskQueue
Throw away all the tasks in the queue

Specified by:
clear in interface TaskQueue

getTasks

public java.util.Collection getTasks()
Description copied from interface: TaskQueue
Get a Collection of the Tasks currently in the queue

Specified by:
getTasks in interface TaskQueue


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.