Example usage for org.apache.commons.collections.buffer UnboundedFifoBuffer UnboundedFifoBuffer

List of usage examples for org.apache.commons.collections.buffer UnboundedFifoBuffer UnboundedFifoBuffer

Introduction

In this page you can find the example usage for org.apache.commons.collections.buffer UnboundedFifoBuffer UnboundedFifoBuffer.

Prototype

public UnboundedFifoBuffer(int initialSize) 

Source Link

Document

Constructs an UnboundedFifoBuffer with the specified number of elements.

Usage

From source file:org.opencms.main.CmsSessionInfo.java

/**
 * Returns the broadcast queue of the user to which this session info belongs.<p>
 * /*from  w w  w.  j  a  va 2s. c  o  m*/
 * @return the broadcast queue of the user to which this session info belongs
 */
public Buffer getBroadcastQueue() {

    if (m_broadcastQueue == null) {
        m_broadcastQueue = BufferUtils.synchronizedBuffer(new UnboundedFifoBuffer(QUEUE_SIZE));
    }
    return m_broadcastQueue;
}