Java源码示例:org.jctools.queues.MpscCompoundQueue
示例1
/**
* 固定复合数组队列
*/
public void teste1()
{
MpscCompoundQueue[] qs=new MpscCompoundQueue[65535];
for(int i=0;i<qs.length;i++)
{
qs[i]=new MpscCompoundQueue<>(1024);
}
}
示例2
@Inject
public StackdriverReporter(
Lazy<TraceServiceFutureStub> traceServiceClient, MonitoringConfig config) {
this.traceServiceClient = traceServiceClient;
queue = new MpscCompoundQueue<>(config.getTraceQueueSize());
projectId = config.getStackdriverProjectId();
}
示例3
MpscCompoundBuffer() {
queue = new MpscCompoundQueue<>(BUFFER_SIZE);
}