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 TarantoolHeader
fromMessagePackValue(org.msgpack.value.Value value)
Creates an instance ofTarantoolHeader
from MessagePackValue
Long
getSync()
org.msgpack.value.Value
toMessagePackValue(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:
toMessagePackValue
in 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 ofTarantoolHeader
from MessagePackValue
- Parameters:
value
- must be an instance ofMapValue
- Returns:
- a
TarantoolHeader
instance - Throws:
TarantoolProtocolException
- if the passed value is not aMapValue
, mandatory fields are absent or have wrong type
-
-