EVENT - the type parameterpublic final class CallbackAsyncConsumer<EVENT> extends Object
| Modifier and Type | Field and Description |
|---|---|
private Consumer<EVENT> |
eventBodyConsumer |
private ExecutorService |
executor |
| Constructor and Description |
|---|
CallbackAsyncConsumer(Consumer<EVENT> eventBodyConsumer)
Instantiates a new Callback async consumer.
|
CallbackAsyncConsumer(ExecutorService executor,
Consumer<EVENT> eventBodyConsumer)
Instantiates a new Callback async consumer.
|
CallbackAsyncConsumer(int corePoolSize,
int maximumPoolSize,
long keepAliveSecond,
int capacity,
Consumer<EVENT> eventBodyConsumer)
Instantiates a new Callback async consumer.
|
private final ExecutorService executor
public CallbackAsyncConsumer(Consumer<EVENT> eventBodyConsumer)
eventBodyConsumer - the event body consumerpublic CallbackAsyncConsumer(int corePoolSize,
int maximumPoolSize,
long keepAliveSecond,
int capacity,
Consumer<EVENT> eventBodyConsumer)
corePoolSize - the core pool sizemaximumPoolSize - the maximum pool sizekeepAliveSecond - the keep alive secondcapacity - the capacityeventBodyConsumer - the event body consumerpublic CallbackAsyncConsumer(ExecutorService executor, Consumer<EVENT> eventBodyConsumer)
executor - the executoreventBodyConsumer - the event body consumerpublic void asyncAction(EVENT eventBody)
eventBody - the event bodyCopyright © 2024. All rights reserved.