public class AsyncDispatcherImpl<W,S extends Message,T extends Message> extends Object implements AsyncDispatcher<S>
AsyncDispatcher.DispatchStatus
Constructor and Description |
---|
AsyncDispatcherImpl(DispatcherState<W,S,T> state,
AsyncPolicy asyncPolicy,
SyncDispatcher<S> syncDispatcher) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
getQueueSize()
Returns the number of messages that are currently queued
awaiting for dispatch.
|
CompletableFuture<AsyncDispatcher.DispatchStatus> |
send(S message)
Asynchronously send the given message.
|
public AsyncDispatcherImpl(DispatcherState<W,S,T> state, AsyncPolicy asyncPolicy, SyncDispatcher<S> syncDispatcher)
public CompletableFuture<AsyncDispatcher.DispatchStatus> send(S message)
AsyncDispatcher
send
in interface AsyncDispatcher<S extends Message>
message
- the message to sendpublic int getQueueSize()
AsyncDispatcher
getQueueSize
in interface AsyncDispatcher<S extends Message>
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2020. All rights reserved.