当前位置: 首页>>代码示例>>Java>>正文


Java SpinPolicy类代码示例

本文整理汇总了Java中com.conversantmedia.util.concurrent.SpinPolicy的典型用法代码示例。如果您正苦于以下问题:Java SpinPolicy类的具体用法?Java SpinPolicy怎么用?Java SpinPolicy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SpinPolicy类属于com.conversantmedia.util.concurrent包,在下文中一共展示了SpinPolicy类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setup

import com.conversantmedia.util.concurrent.SpinPolicy; //导入依赖的package包/类
@Setup
public void setup() {
    executor = Executors.newSingleThreadExecutor();
    msgQueue = new PushPullBlockingQueue<>(Run.QUEUE_SIZE, SpinPolicy.SPINNING);
}
 
开发者ID:conversant,项目名称:disruptor_benchmark,代码行数:6,代码来源:PushPullBlockingQueueBenchmark.java

示例2: setup

import com.conversantmedia.util.concurrent.SpinPolicy; //导入依赖的package包/类
@Setup
public void setup() {
    executor = Executors.newFixedThreadPool(2*Run.MULTITHREAD);
    msgQueue = new MPMCBlockingQueue<Long>(Run.QUEUE_SIZE, SpinPolicy.SPINNING);
}
 
开发者ID:conversant,项目名称:disruptor_benchmark,代码行数:6,代码来源:MPMCBlockingQueueBenchmark.java

示例3: setup

import com.conversantmedia.util.concurrent.SpinPolicy; //导入依赖的package包/类
@Setup
public void setup() {
    executor = Executors.newFixedThreadPool(2*Run.MULTITHREAD);
    msgQueue = new DisruptorBlockingQueue<>(Run.QUEUE_SIZE, SpinPolicy.SPINNING);
}
 
开发者ID:conversant,项目名称:disruptor_benchmark,代码行数:6,代码来源:DisruptorBlockingQueueBenchmark.java

示例4: getCpuSpinPolicyForWaitingInBuffer

import com.conversantmedia.util.concurrent.SpinPolicy; //导入依赖的package包/类
public SpinPolicy getCpuSpinPolicyForWaitingInBuffer()
{
  return cpuSpinPolicyForWaitingInBuffer;
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:5,代码来源:AbstractKuduInputOperator.java

示例5: setCpuSpinPolicyForWaitingInBuffer

import com.conversantmedia.util.concurrent.SpinPolicy; //导入依赖的package包/类
public void setCpuSpinPolicyForWaitingInBuffer(SpinPolicy cpuSpinPolicyForWaitingInBuffer)
{
  this.cpuSpinPolicyForWaitingInBuffer = cpuSpinPolicyForWaitingInBuffer;
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:5,代码来源:AbstractKuduInputOperator.java

示例6: DisruptorBlockingQueueFactory

import com.conversantmedia.util.concurrent.SpinPolicy; //导入依赖的package包/类
private DisruptorBlockingQueueFactory(final SpinPolicy spinPolicy) {
    this.spinPolicy = spinPolicy;
}
 
开发者ID:apache,项目名称:logging-log4j2,代码行数:4,代码来源:DisruptorBlockingQueueFactory.java

示例7: createFactory

import com.conversantmedia.util.concurrent.SpinPolicy; //导入依赖的package包/类
@PluginFactory
public static <E> DisruptorBlockingQueueFactory<E> createFactory(
    @PluginAttribute(value = "SpinPolicy", defaultString = "WAITING") final SpinPolicy spinPolicy
) {
    return new DisruptorBlockingQueueFactory<>(spinPolicy);
}
 
开发者ID:apache,项目名称:logging-log4j2,代码行数:7,代码来源:DisruptorBlockingQueueFactory.java

示例8: createQueue

import com.conversantmedia.util.concurrent.SpinPolicy; //导入依赖的package包/类
@Override
BlockingQueue<String> createQueue(final int capacity) {
    return DisruptorBlockingQueueFactory.<String>createFactory(SpinPolicy.SPINNING).create(capacity);
}
 
开发者ID:apache,项目名称:logging-log4j2,代码行数:5,代码来源:RunConversant.java


注:本文中的com.conversantmedia.util.concurrent.SpinPolicy类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。