public interface ControlEventHandler
Client.controlEventHandler(ControlEventHandler) API
that allows one to react to control events.
Right now the only event emitted is a RollbackMessage which
should be handled appropriately since it indicates that very likely the current consumer state is
ahead of the server. This happens during failover scenarios and/or if something weird happened
to the persisted session state.
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 primitives!
| Modifier and Type | Method and Description |
|---|---|
void |
onEvent(ChannelFlowController flowController,
io.netty.buffer.ByteBuf event)
Called every time when a control event happens that should be handled by
consumers of the
Client. |
void onEvent(ChannelFlowController flowController, io.netty.buffer.ByteBuf event)
Client.
Even if you are not doing anything with the events, make sure to release the buffer!!
flowController - the flow controller for the passed event.event - the control event happening.Copyright © 2021 Couchbase, Inc.. All rights reserved.