org.mapdb
Class Queues.CircularQueue<E>

java.lang.Object
  extended by org.mapdb.Queues.SimpleQueue<E>
      extended by org.mapdb.Queues.CircularQueue<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, BlockingQueue<E>, Queue<E>
Enclosing class:
Queues

public static class Queues.CircularQueue<E>
extends Queues.SimpleQueue<E>


Nested Class Summary
 
Nested classes/interfaces inherited from class org.mapdb.Queues.SimpleQueue
Queues.SimpleQueue.Node<E>, Queues.SimpleQueue.NodeSerializer<E>
 
Field Summary
protected  Atomic.Long headInsert
           
protected  Lock lock
           
protected  long size
           
 
Fields inherited from class org.mapdb.Queues.SimpleQueue
engine, head, locks, nodeSerializer, serializer, TICK, useLocks
 
Constructor Summary
Queues.CircularQueue(Engine engine, Serializer<E> serializer, long headRecid, long headInsertRecid, long size)
           
 
Method Summary
 boolean add(Object o)
           
 void clear()
           
 E peek()
           
 E poll()
           
 
Methods inherited from class org.mapdb.Queues.SimpleQueue
addAll, close, contains, containsAll, drainTo, drainTo, element, isEmpty, iterator, offer, offer, poll, put, remainingCapacity, remove, remove, removeAll, retainAll, size, take, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Field Detail

headInsert

protected final Atomic.Long headInsert

lock

protected final Lock lock

size

protected final long size
Constructor Detail

Queues.CircularQueue

public Queues.CircularQueue(Engine engine,
                            Serializer<E> serializer,
                            long headRecid,
                            long headInsertRecid,
                            long size)
Method Detail

add

public boolean add(Object o)

clear

public void clear()
Specified by:
clear in interface Collection<E>
Overrides:
clear in class Queues.SimpleQueue<E>

poll

public E poll()
Specified by:
poll in interface Queue<E>
Overrides:
poll in class Queues.SimpleQueue<E>

peek

public E peek()
Specified by:
peek in interface Queue<E>
Overrides:
peek in class Queues.SimpleQueue<E>


Copyright © 2014. All Rights Reserved.