本文整理汇总了Java中org.apache.commons.collections.BufferUtils类的典型用法代码示例。如果您正苦于以下问题:Java BufferUtils类的具体用法?Java BufferUtils怎么用?Java BufferUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BufferUtils类属于org.apache.commons.collections包,在下文中一共展示了BufferUtils类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AsyncPollingHelper
import org.apache.commons.collections.BufferUtils; //导入依赖的package包/类
/***********************************************************************************************
* @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));
}
示例2: setBufferSize
import org.apache.commons.collections.BufferUtils; //导入依赖的package包/类
/************************************************************************************************
* @param size sets the maximum size of the circular fifo buffer
************************************************************************************************/
public void setBufferSize(int size){
fifo = (CircularFifoBuffer) BufferUtils.synchronizedBuffer(new CircularFifoBuffer(size));
}
示例3: NotificationList
import org.apache.commons.collections.BufferUtils; //导入依赖的package包/类
private NotificationList() {
list = BufferUtils.synchronizedBuffer(new CircularFifoBuffer(10));
}
示例4: ChannelBuffer
import org.apache.commons.collections.BufferUtils; //导入依赖的package包/类
public ChannelBuffer(final String name, final int bufferSize) {
this.channelName = name;
this.messageBuffer = BufferUtils.synchronizedBuffer(new CircularFifoBuffer(bufferSize));
this.size = bufferSize;
}
示例5: createChannelBuffer
import org.apache.commons.collections.BufferUtils; //导入依赖的package包/类
public void createChannelBuffer() {
this.messageBuffer = BufferUtils.synchronizedBuffer(new CircularFifoBuffer(MAX_BUFFER_SIZE));
this.size = MAX_BUFFER_SIZE;
}