public interface

TaskQueue

org.apache.archiva.redback.components.taskqueue.TaskQueue
Known Indirect Subclasses

Summary

Public Methods
abstract List<Task> getQueueSnapshot()
abstract Task poll(int timeout, TimeUnit timeUnit)
Retrieves and removes the head of the queue, waiting at most timeout timeUnit when no element is available.
abstract boolean put(Task task)
abstract boolean remove(Task task)
abstract boolean removeAll(List<Task> tasks)
abstract Task take()

Public Methods

public abstract List<Task> getQueueSnapshot ()

public abstract Task poll (int timeout, TimeUnit timeUnit)

Retrieves and removes the head of the queue, waiting at most timeout timeUnit when no element is available.

Parameters
timeout time to wait, in timeUnit units
timeUnit how to interpret the timeout parameter.
Returns
  • the head of the queue, or null if the timeout elapsed
Throws
InterruptedException when this thread is interrupted while waiting

public abstract boolean put (Task task)

Parameters
task The task to add to the queue.
Returns
  • Returns true if the task was accepted into the queue.

public abstract boolean remove (Task task)

Throws
ClassCastException
NullPointerException

public abstract boolean removeAll (List<Task> tasks)

Throws
ClassCastException
NullPointerException

public abstract Task take ()