Package io.tarantool.driver.protocol
Class TarantoolHeader
- java.lang.Object
-
- io.tarantool.driver.protocol.TarantoolHeader
-
- All Implemented Interfaces:
Packable,Serializable
public final class TarantoolHeader extends Object implements Packable
Represents the Tarantool packet frame header. See https://www.tarantool.io/en/doc/2.3/dev_guide/internals/box_protocol/#box-protocol-header- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TarantoolHeaderfromMessagePackValue(org.msgpack.value.Value value)Creates an instance ofTarantoolHeaderfrom MessagePackValueLonggetSync()org.msgpack.value.ValuetoMessagePackValue(MessagePackObjectMapper mapper)Converts the current header contents into a MessagePackValue
-
-
-
Method Detail
-
getSync
public Long getSync()
-
toMessagePackValue
public org.msgpack.value.Value toMessagePackValue(MessagePackObjectMapper mapper)
Converts the current header contents into a MessagePackValue- Specified by:
toMessagePackValuein interfacePackable- Parameters:
mapper- configured Java objects to entities mapper- Returns:
- MessagePack representation of the header
-
fromMessagePackValue
public static TarantoolHeader fromMessagePackValue(org.msgpack.value.Value value) throws TarantoolProtocolException
Creates an instance ofTarantoolHeaderfrom MessagePackValue- Parameters:
value- must be an instance ofMapValue- Returns:
- a
TarantoolHeaderinstance - Throws:
TarantoolProtocolException- if the passed value is not aMapValue, mandatory fields are absent or have wrong type
-
-