Package io.tarantool.driver.protocol
Class TarantoolResponse
- java.lang.Object
-
- io.tarantool.driver.protocol.TarantoolResponse
-
public final class TarantoolResponse extends Object
Base class for all kinds of responses received from Tarantool server. See https://www.tarantool.io/en/doc/latest/dev_guide/internals/box_protocol/#binary-protocol-responses-if-no-error-and-no-sql
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TarantoolResponsefromMessagePack(org.msgpack.core.MessageUnpacker unpacker)Create Tarantool response from the decoded binary data usingMessageUnpackerTarantoolResponseBodygetBody()Get response bodyLonggetResponseCode()Get response codeTarantoolResponseTypegetResponseType()Get response typeLonggetSyncId()Get request ID
-
-
-
Method Detail
-
getSyncId
public Long getSyncId()
Get request ID- Returns:
- a number
-
getBody
public TarantoolResponseBody getBody()
Get response body- Returns:
- a MessagePack entity
- See Also:
Value
-
getResponseType
public TarantoolResponseType getResponseType()
Get response type- Returns:
- code of
TarantoolRequestTypetype
-
getResponseCode
public Long getResponseCode()
Get response code- Returns:
- a number, equal to 0 in case of OK response
- See Also:
TarantoolResponseType
-
fromMessagePack
public static TarantoolResponse fromMessagePack(org.msgpack.core.MessageUnpacker unpacker) throws TarantoolProtocolException
Create Tarantool response from the decoded binary data usingMessageUnpacker- Parameters:
unpacker- configuredMessageUnpacker- Returns:
- Tarantool response populated from the decoded binary data
- Throws:
TarantoolProtocolException- if the unpacked data is invalid
-
-