org.cometd.server.ext
Class ArrayIdQueue<E>

java.lang.Object
  extended by 
      extended by org.cometd.server.ext.ArrayIdQueue<E>

public class ArrayIdQueue<E>
extends


Constructor Summary
ArrayIdQueue()
           
ArrayIdQueue(int capacity)
           
ArrayIdQueue(int initCapacity, int growBy)
           
ArrayIdQueue(int initCapacity, int growBy, java.lang.Object lock)
           
 
Method Summary
 boolean add(E e)
           
 void add(int index, E element)
           
 void addUnsafe(E e)
           
 int getAssociatedId(int index)
           
 long getAssociatedIdUnsafe(int index)
           
 int getCurrentId()
           
protected  boolean grow()
           
 void incrementCurrentId()
           
 boolean offer(E e)
           
 E remove(int index)
           
 E set(int index, E element)
           
 void setCurrentId(int currentId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayIdQueue

public ArrayIdQueue()

ArrayIdQueue

public ArrayIdQueue(int capacity)

ArrayIdQueue

public ArrayIdQueue(int initCapacity,
                    int growBy)

ArrayIdQueue

public ArrayIdQueue(int initCapacity,
                    int growBy,
                    java.lang.Object lock)
Method Detail

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)

addUnsafe

public void addUnsafe(E e)

offer

public boolean offer(E e)

getAssociatedId

public int getAssociatedId(int index)

getAssociatedIdUnsafe

public long getAssociatedIdUnsafe(int index)

remove

public E remove(int index)

set

public E set(int index,
             E element)

add

public void add(int index,
                E element)

grow

protected boolean grow()


Copyright © 2011 Dojo Foundation. All Rights Reserved.