本文整理汇总了Java中org.apache.commons.collections.BufferUtils.synchronizedBuffer方法的典型用法代码示例。如果您正苦于以下问题:Java BufferUtils.synchronizedBuffer方法的具体用法?Java BufferUtils.synchronizedBuffer怎么用?Java BufferUtils.synchronizedBuffer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.collections.BufferUtils
的用法示例。
在下文中一共展示了BufferUtils.synchronizedBuffer方法的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;
}