Go to console

DependencyPriorityBlockingQueue

public class DependencyPriorityBlockingQueue extends PriorityBlockingQueue<E extends Dependency & Task & PriorityProvider>

The DependencyPriorityBlockingQueue provides all functionality of a PriorityBlockingQueue while simultaneously supporting task dependencies using the Dependency interface. An independent worker is guaranteed to complete before the dependent worker that specifies it. Priorities are specified by the worker extending the Priority class. When Priorities and Dependencies conflict, the expectation in a dependency chain is that the entire chain will run at the priority specified by the independent worker. No effort is made to guarantee all dependencies are satisfied. Responsibility falls on outside components to validate the dependency graph for complete execution.

Public Constructor Summary

Public Method Summary

void
clear()
boolean
contains(Object o)
int
drainTo(Collection<? super E> c, int maxElements)
int
drainTo(Collection<? super E> c)
E
peek()
E
poll(long timeout, TimeUnit unit)
E
poll()
void
recycleBlockedQueue()
Removes all items from blocked Queue and inserts into primary queue to retry.
boolean
remove(Object o)
boolean
removeAll(Collection<?> collection)
int
size()
E
take()
<T> T[]
toArray(T[] a)
Object[]

Inherited Method Summary

Public Constructors

public DependencyPriorityBlockingQueue ()

Public Methods

public void clear ()

public boolean contains (Object o)

Parameters
o

public int drainTo (Collection<? super E> c, int maxElements)

Parameters
c
maxElements

public int drainTo (Collection<? super E> c)

Parameters
c

public E peek ()

public E poll (long timeout, TimeUnit unit)

Parameters
timeout
unit
Throws
InterruptedException

public E poll ()

public void recycleBlockedQueue ()

Removes all items from blocked Queue and inserts into primary queue to retry.

public boolean remove (Object o)

Parameters
o

public boolean removeAll (Collection<?> collection)

Parameters
collection

public int size ()

public E take ()

Throws
InterruptedException

public T[] toArray (T[] a)

Parameters
a

public Object[] toArray ()