| 程序包 | 说明 |
|---|---|
| com.alipay.disruptor | |
| com.alipay.disruptor.dsl |
| 限定符和类型 | 类和说明 |
|---|---|
class |
BlockingWaitStrategy
Blocking strategy that uses a lock and condition variable for
EventProcessors waiting on a barrier. |
class |
BusySpinWaitStrategy
Busy Spin strategy that uses a busy spin loop for
EventProcessors waiting on a barrier. |
class |
LiteBlockingWaitStrategy
Variation of the
BlockingWaitStrategy that attempts to elide conditional wake-ups when
the lock is uncontended. |
class |
LiteTimeoutBlockingWaitStrategy
Variation of the
TimeoutBlockingWaitStrategy that attempts to elide conditional wake-ups
when the lock is uncontended. |
class |
PhasedBackoffWaitStrategy
Phased wait strategy for waiting
EventProcessors on a barrier. |
class |
SleepingWaitStrategy
Sleeping strategy that initially spins, then uses a Thread.yield(), and
eventually sleep (
LockSupport.parkNanos(1)) for the minimum
number of nanos the OS and JVM will allow while the
EventProcessors are waiting on a barrier. |
class |
TimeoutBlockingWaitStrategy |
class |
YieldingWaitStrategy
Yielding strategy that uses a Thread.yield() for
EventProcessors waiting on a barrier
after an initially spinning. |
| 限定符和类型 | 字段和说明 |
|---|---|
protected WaitStrategy |
AbstractSequencer.waitStrategy |
| 限定符和类型 | 方法和说明 |
|---|---|
static <E> RingBuffer<E> |
RingBuffer.create(ProducerType producerType,
EventFactory<E> factory,
int bufferSize,
WaitStrategy waitStrategy)
Create a new Ring Buffer with the specified producer type (SINGLE or MULTI)
|
static <E> RingBuffer<E> |
RingBuffer.createMultiProducer(EventFactory<E> factory,
int bufferSize,
WaitStrategy waitStrategy)
Create a new multiple producer RingBuffer with the specified wait strategy.
|
static <E> RingBuffer<E> |
RingBuffer.createSingleProducer(EventFactory<E> factory,
int bufferSize,
WaitStrategy waitStrategy)
Create a new single producer RingBuffer with the specified wait strategy.
|
| 构造器和说明 |
|---|
AbstractSequencer(int bufferSize,
WaitStrategy waitStrategy)
Create with the specified buffer size and wait strategy.
|
MultiProducerSequencer(int bufferSize,
WaitStrategy waitStrategy)
Construct a Sequencer with the selected wait strategy and buffer size.
|
PhasedBackoffWaitStrategy(long spinTimeout,
long yieldTimeout,
TimeUnit units,
WaitStrategy fallbackStrategy) |
SingleProducerSequencer(int bufferSize,
WaitStrategy waitStrategy)
Construct a Sequencer with the selected wait strategy and buffer size.
|
| 构造器和说明 |
|---|
Disruptor(EventFactory<T> eventFactory,
int ringBufferSize,
Executor executor,
ProducerType producerType,
WaitStrategy waitStrategy)
已过时。
Use a
ThreadFactory instead of an Executor as a the ThreadFactory
is able to report errors when it is unable to construct a thread to run a producer. |
Disruptor(EventFactory<T> eventFactory,
int ringBufferSize,
ThreadFactory threadFactory,
ProducerType producerType,
WaitStrategy waitStrategy)
Create a new Disruptor.
|
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.