public class DisruptorFactory extends Object implements Startable
| 限定符和类型 | 字段和说明 |
|---|---|
protected ConcurrentHashMap<String,TreeSet<DomainEventHandler>> |
handlesMap |
static String |
module |
| 构造器和说明 |
|---|
DisruptorFactory() |
DisruptorFactory(DisruptorParams disruptorParams,
ContainerCallback containerCallback,
DisruptorPoolFactory disruptorPoolFactory) |
| 限定符和类型 | 方法和说明 |
|---|---|
com.lmax.disruptor.dsl.Disruptor |
addEventMessageHandler(com.lmax.disruptor.dsl.Disruptor dw,
String topic,
TreeSet<DomainEventHandler> handlers) |
com.lmax.disruptor.dsl.Disruptor |
createDisruptor(String topic)
one topic one EventDisruptor
|
com.lmax.disruptor.dsl.Disruptor |
createDw(String topic) |
com.lmax.disruptor.dsl.Disruptor |
createSingleDisruptor(String topic)
single producer :single consumer
no lock
|
com.lmax.disruptor.dsl.Disruptor |
createSingleDw(String topic) |
com.lmax.disruptor.dsl.Disruptor |
getDisruptor(String topic) |
TreeSet<DomainEventHandler> |
getTreeSet() |
boolean |
isContain(String topic) |
protected Collection |
loadEvenHandler(String topic)
if there are many consumers, execution order will be alphabetical list by
Name of @Consumer class.
|
protected Collection |
loadOnEventConsumers(String topic) |
void |
releaseDisruptor(Object owner) |
void |
start()
Start this component.
|
void |
stop()
Stop this component.
|
public static final String module
protected final ConcurrentHashMap<String,TreeSet<DomainEventHandler>> handlesMap
public DisruptorFactory(DisruptorParams disruptorParams, ContainerCallback containerCallback, DisruptorPoolFactory disruptorPoolFactory)
public DisruptorFactory()
public com.lmax.disruptor.dsl.Disruptor createDw(String topic)
public com.lmax.disruptor.dsl.Disruptor createSingleDw(String topic)
public com.lmax.disruptor.dsl.Disruptor addEventMessageHandler(com.lmax.disruptor.dsl.Disruptor dw,
String topic,
TreeSet<DomainEventHandler> handlers)
public com.lmax.disruptor.dsl.Disruptor getDisruptor(String topic)
public void releaseDisruptor(Object owner)
public com.lmax.disruptor.dsl.Disruptor createDisruptor(String topic)
topic - public com.lmax.disruptor.dsl.Disruptor createSingleDisruptor(String topic)
topic - public boolean isContain(String topic)
protected Collection loadEvenHandler(String topic)
topic - protected Collection loadOnEventConsumers(String topic)
public TreeSet<DomainEventHandler> getTreeSet()
Copyright © 2018. All rights reserved.