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

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

Introduction

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

Prototype

public UnboundedFifoBuffer(int initialSize) 

Source Link

Document

Constructs an UnboundedFifoBuffer with the specified number of elements.

Usage

From source file:messageit.dispatcher.MessageQueue.java

/** Creates an empty MessageQueue */
public MessageQueue() {
    qNorm = BufferUtils.synchronizedBuffer(new UnboundedFifoBuffer(32));

    qHigh = BufferUtils.synchronizedBuffer(new UnboundedFifoBuffer(16));
}

From source file:com.salas.bb.utils.concurrency.CachingCalculator.java

/**
 * Create invaliation queue. Queue will be automatically decorated with blocker.
 * By default queue is unbounded.//from  w w w .jav  a  2  s.c o m
 *
 * @return queue.
 */
protected Buffer createQueueBuffer() {
    return new UnboundedFifoBuffer(100);
}

From source file:org.apache.excalibur.mpool.VariableSizePool.java

/**
 * Constructor for a managed pool//from  w ww  .j  a  v a 2  s.co m
 */
public VariableSizePool(ObjectFactory factory, int size, long key) throws Exception {
    m_buffer = new UnboundedFifoBuffer(size);
    m_factory = factory;
    m_key = key;

    synchronized (m_factory) {
        for (int i = 0; i < size; i++) {
            m_buffer.add(newInstance());
        }
    }
}