public class OnapMsgRouterBatchPublisher extends Object implements Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
OnapMsgRouterBatchPublisher.Builder |
static class |
OnapMsgRouterBatchPublisher.DropPolicy
What to do if the send buffer reaches maximum capacity
|
| Modifier and Type | Method and Description |
|---|---|
static OnapMsgRouterBatchPublisher |
build(OnapMsgRouterPublisher pub,
int atMost,
int maxAgeMs)
For convenience, just provide a publisher and batching limits
|
void |
close()
Close this publisher to stop its background sending thread.
|
OnapMsgRouterBatchPublisher |
send(List<OnapMsgRouterPublisher.Message> msgs)
Queue a set of messages to be sent in a batch.
|
OnapMsgRouterBatchPublisher |
send(OnapMsgRouterPublisher.Message msg)
Queue a message to be sent in a batch.
|
void |
start()
Start the sending thread
|
public static OnapMsgRouterBatchPublisher build(OnapMsgRouterPublisher pub, int atMost, int maxAgeMs)
pub - an underlying publisheratMost - how many messages to batch, at mostmaxAgeMs - how long to wait before send, at mostpublic void start()
public void close()
close in interface Closeableclose in interface AutoCloseablepublic OnapMsgRouterBatchPublisher send(OnapMsgRouterPublisher.Message msg)
msg - a message to sendpublic OnapMsgRouterBatchPublisher send(List<OnapMsgRouterPublisher.Message> msgs)
msgs - a list of messages to sendCopyright © 2024 continual.io. All rights reserved.