public class AsyncEventDispatcher extends Object implements EventDispatcher
| Constructor and Description |
|---|
AsyncEventDispatcher(FlowControlMode flowControlMode,
DatabaseChangeListener consumer) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(Duration timeout)
Blocks until the dispatch thread terminates or the timeout expires.
|
void |
dispatch(DatabaseChangeEvent event) |
void |
gracefulShutdown()
Allows the listener to finish processing the current event and then
starts terminating the dispatch thread.
|
void |
shutdownNow()
Interrupts the listener and starts terminating the dispatch thread.
|
public AsyncEventDispatcher(FlowControlMode flowControlMode, DatabaseChangeListener consumer)
public void dispatch(DatabaseChangeEvent event)
dispatch in interface EventDispatcherpublic void shutdownNow()
shutdownNow in interface EventDispatcherpublic void gracefulShutdown()
gracefulShutdown in interface EventDispatcherpublic boolean awaitTermination(Duration timeout) throws InterruptedException
awaitTermination in interface EventDispatcherInterruptedExceptionCopyright © 2021 Couchbase, Inc.. All rights reserved.