public interface DataEventHandler
Client.dataEventHandler(DataEventHandler) API
that allows one to react to data events.
Right now DcpMutationMessage,
DcpExpirationMessage and
DcpDeletionMessage are emitted, but the expirations are
as of Couchbase Server 4.5.0 not actually emitted. So while good practice to handle them, even if
you opt out to do so make sure to release the buffers.
Keep in mind that the callback is called on the IO event loops, so you should never block or run expensive computations in the callback! Use queues and other synchronization primities!
| Modifier and Type | Method and Description |
|---|---|
void |
onEvent(ChannelFlowController flowController,
io.netty.buffer.ByteBuf event)
Called when a data event happens.
|
void onEvent(ChannelFlowController flowController, io.netty.buffer.ByteBuf event)
Make sure to release the buffers!!
flowController - the flow controller for the passed event.event - the data event happening right now.Copyright © 2021 Couchbase, Inc.. All rights reserved.