public interface DcpRequestDispatcher
| Modifier and Type | Method and Description |
|---|---|
io.netty.util.concurrent.Future<DcpResponse> |
sendRequest(io.netty.buffer.ByteBuf message)
Assigns a value to the request's
opaque field and writes
the message to the channel. |
io.netty.util.concurrent.Future<DcpResponse> sendRequest(io.netty.buffer.ByteBuf message)
opaque field and writes
the message to the channel. Returns a Future that is completed
when the response is received or the channel is closed.
If the response is received, the Future is always considered successful regardless of the status code returned by the server; the caller is responsible for inspecting the status code.
If the channel is not currently active, or if the channel is closed
before the response is received, the Future fails with
NotConnectedException as the cause.
Callers are responsible for releasing the ByteBuf from successful
Futures. This is true even if a call to Future.get or
Future.await times out, in which case the caller should add
a listener to release the buffer when the Future eventually completes.
Listeners are invoked by the channel's event loop thread, so they should return quickly.
Callers may wish to use the type alias DcpResponseListener
when adding listeners.
Copyright © 2021 Couchbase, Inc.. All rights reserved.