org.openrdf.sail.rdbms.managers.helpers
Class BatchBlockingQueue

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractQueue<Batch>
          extended by org.openrdf.sail.rdbms.managers.helpers.BatchBlockingQueue
All Implemented Interfaces:
Iterable<Batch>, Collection<Batch>, BlockingQueue<Batch>, Queue<Batch>

public class BatchBlockingQueue
extends AbstractQueue<Batch>
implements BlockingQueue<Batch>

Author:
James Leigh

Constructor Summary
BatchBlockingQueue(int capacity)
           
 
Method Summary
 int drainTo(Collection<? super Batch> c)
           
 int drainTo(Collection<? super Batch> c, int n)
           
 Iterator<Batch> iterator()
           
 boolean offer(Batch e)
           
 boolean offer(Batch e, long timeout, TimeUnit unit)
           
 Batch peek()
           
 Batch poll()
           
 Batch poll(long timeout, TimeUnit unit)
           
 void put(Batch e)
           
 int remainingCapacity()
           
 boolean remove(Object o)
           
 int size()
           
 Batch take()
           
 
Methods inherited from class java.util.AbstractQueue
add, addAll, clear, element, remove
 
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.concurrent.BlockingQueue
add, contains
 
Methods inherited from interface java.util.Queue
element, remove
 
Methods inherited from interface java.util.Collection
addAll, clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray
 

Constructor Detail

BatchBlockingQueue

public BatchBlockingQueue(int capacity)
Method Detail

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<Batch>
Specified by:
remove in interface BlockingQueue<Batch>
Overrides:
remove in class AbstractCollection<Batch>

iterator

public Iterator<Batch> iterator()
Specified by:
iterator in interface Iterable<Batch>
Specified by:
iterator in interface Collection<Batch>
Specified by:
iterator in class AbstractCollection<Batch>

size

public int size()
Specified by:
size in interface Collection<Batch>
Specified by:
size in class AbstractCollection<Batch>

offer

public boolean offer(Batch e)
Specified by:
offer in interface BlockingQueue<Batch>
Specified by:
offer in interface Queue<Batch>

peek

public Batch peek()
Specified by:
peek in interface Queue<Batch>

poll

public Batch poll()
Specified by:
poll in interface Queue<Batch>

drainTo

public int drainTo(Collection<? super Batch> c)
Specified by:
drainTo in interface BlockingQueue<Batch>

drainTo

public int drainTo(Collection<? super Batch> c,
                   int n)
Specified by:
drainTo in interface BlockingQueue<Batch>

offer

public boolean offer(Batch e,
                     long timeout,
                     TimeUnit unit)
              throws InterruptedException
Specified by:
offer in interface BlockingQueue<Batch>
Throws:
InterruptedException

poll

public Batch poll(long timeout,
                  TimeUnit unit)
           throws InterruptedException
Specified by:
poll in interface BlockingQueue<Batch>
Throws:
InterruptedException

put

public void put(Batch e)
         throws InterruptedException
Specified by:
put in interface BlockingQueue<Batch>
Throws:
InterruptedException

remainingCapacity

public int remainingCapacity()
Specified by:
remainingCapacity in interface BlockingQueue<Batch>

take

public Batch take()
           throws InterruptedException
Specified by:
take in interface BlockingQueue<Batch>
Throws:
InterruptedException


Copyright © 2001-2008 Aduna. All Rights Reserved.