org.mortbay.cometd.ext
Class ArrayIdQueue<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
org.mortbay.util.ArrayQueue<E>
org.mortbay.cometd.ext.ArrayIdQueue<E>
- All Implemented Interfaces:
- Iterable<E>, Collection<E>, List<E>, Queue<E>
public class ArrayIdQueue<E>
- extends ArrayQueue<E>
Methods inherited from interface java.util.Collection |
addAll, contains, containsAll, equals, hashCode, iterator, remove, removeAll, retainAll, toArray, toArray |
ArrayIdQueue
public ArrayIdQueue()
ArrayIdQueue
public ArrayIdQueue(int capacity)
ArrayIdQueue
public ArrayIdQueue(int initCapacity,
int growBy)
ArrayIdQueue
public ArrayIdQueue(int initCapacity,
int growBy,
Object lock)
getCurrentId
public int getCurrentId()
- Returns:
- currentId the latest batch that has been sent to the client
setCurrentId
public void setCurrentId(int currentId)
incrementCurrentId
public void incrementCurrentId()
add
public boolean add(E e)
- Specified by:
add
in interface Collection<E>
- Specified by:
add
in interface List<E>
- Overrides:
add
in class ArrayQueue<E>
addUnsafe
public void addUnsafe(E e)
- Description copied from class:
ArrayQueue
- Add without synchronization or bounds checking
- Overrides:
addUnsafe
in class ArrayQueue<E>
- See Also:
ArrayQueue.add(Object)
offer
public boolean offer(E e)
- Specified by:
offer
in interface Queue<E>
- Overrides:
offer
in class ArrayQueue<E>
getAssociatedId
public int getAssociatedId(int index)
getAssociatedIdUnsafe
public long getAssociatedIdUnsafe(int index)
remove
public E remove(int index)
- Specified by:
remove
in interface List<E>
- Overrides:
remove
in class ArrayQueue<E>
set
public E set(int index,
E element)
- Specified by:
set
in interface List<E>
- Overrides:
set
in class ArrayQueue<E>
add
public void add(int index,
E element)
- Specified by:
add
in interface List<E>
- Overrides:
add
in class ArrayQueue<E>
grow
protected boolean grow()
- Overrides:
grow
in class ArrayQueue<E>
Copyright © 1995-2009 Mort Bay Consulting. All Rights Reserved.