Java 类org.apache.commons.collections.BufferUtils 实例源码

项目:LSM9DS1-Pi4j-Driver    文件:AsyncPollingHelper.java   
/***********************************************************************************************
 * @param driver Handle to the driver class that will do the polling
 ***********************************************************************************************/
public AsyncPollingHelper(Driver driver) {
    this.driver = driver;

    //Default the max buffer size to 10 seconds worth of imu data
    int maxSize = Math.round(driver.getDatarate().getHz() * 10);
    fifo = BufferUtils.synchronizedBuffer(new CircularFifoBuffer(maxSize));
}
项目:LSM9DS1-Pi4j-Driver    文件:AsyncPollingHelper.java   
/************************************************************************************************
 * @param size sets the maximum size of the circular fifo buffer
 ************************************************************************************************/
public void setBufferSize(int size){
    fifo = (CircularFifoBuffer) BufferUtils.synchronizedBuffer(new CircularFifoBuffer(size));
}
项目:juddi    文件:NotificationList.java   
private NotificationList() {    
    list = BufferUtils.synchronizedBuffer(new CircularFifoBuffer(10));
}
项目:AIDR    文件:ChannelBuffer.java   
public ChannelBuffer(final String name, final int bufferSize) {
    this.channelName = name;
    this.messageBuffer = BufferUtils.synchronizedBuffer(new CircularFifoBuffer(bufferSize));
    this.size = bufferSize;
}
项目:AIDR    文件:ChannelBuffer.java   
public void createChannelBuffer() {
    this.messageBuffer = BufferUtils.synchronizedBuffer(new CircularFifoBuffer(MAX_BUFFER_SIZE));
    this.size = MAX_BUFFER_SIZE;
}
项目:AIDR    文件:ChannelBuffer.java   
public void createChannelBuffer(final int bufferSize) {
    this.messageBuffer = BufferUtils.synchronizedBuffer(new CircularFifoBuffer(bufferSize));
    this.size = bufferSize;
}