public class DisruptorManage extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static DisruptorManage |
getInstance()
获取实例
|
String |
getTemporaryName()
获取临时名称
|
<T> com.lmax.disruptor.dsl.Disruptor<T> |
registered(String name,
com.lmax.disruptor.EventFactory<T> eventFactory,
int bufferSize)
注册 Disruptor
|
<T> com.lmax.disruptor.dsl.Disruptor<T> |
registered(String name,
com.lmax.disruptor.EventFactory<T> eventFactory,
int bufferSize,
com.lmax.disruptor.dsl.ProducerType producerType,
com.lmax.disruptor.WaitStrategy waitStrategy)
注册 Disruptor
|
void |
shutdown(String name)
根据名称关闭 disruption
|
public String getTemporaryName()
public void shutdown(String name)
name - 名称public static DisruptorManage getInstance()
public <T> com.lmax.disruptor.dsl.Disruptor<T> registered(String name, com.lmax.disruptor.EventFactory<T> eventFactory, int bufferSize)
T - 泛型name - 注册名称eventFactory - 事件执行工厂bufferSize - 指定环形缓冲区的大小,必须是2的幂. RingBuffer 大小,必须是 2 的 N 次方;public <T> com.lmax.disruptor.dsl.Disruptor<T> registered(String name, com.lmax.disruptor.EventFactory<T> eventFactory, int bufferSize, com.lmax.disruptor.dsl.ProducerType producerType, com.lmax.disruptor.WaitStrategy waitStrategy)
T - 泛型name - 注册名称eventFactory - 事件执行工厂bufferSize - 指定环形缓冲区的大小,必须是2的幂. RingBuffer 大小,必须是 2 的 N 次方;producerType - 定义生产者为单个还是多个waitStrategy - 定义消费者策略Copyright © 2019. All rights reserved.