Package org.apache.cassandra.transport
Class Envelope
java.lang.Object
org.apache.cassandra.transport.Envelope
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal io.netty.buffer.ByteBuffinal Envelope.Headerstatic final byte -
Constructor Summary
ConstructorsConstructorDescriptionEnvelope(Envelope.Header header, io.netty.buffer.ByteBuf body) An on-wire message envelope consists of a header and a body. -
Method Summary
Modifier and TypeMethodDescriptionclone()static Envelopecreate(Message.Type type, int streamId, ProtocolVersion version, EnumSet<Envelope.Header.Flag> flags, io.netty.buffer.ByteBuf body) io.netty.buffer.ByteBufvoidvoidencodeInto(ByteBuffer buf) booleanrelease()voidretain()with(io.netty.buffer.ByteBuf newBody)
-
Field Details
-
PROTOCOL_VERSION_MASK
public static final byte PROTOCOL_VERSION_MASK- See Also:
-
header
-
body
public final io.netty.buffer.ByteBuf body
-
-
Constructor Details
-
Envelope
An on-wire message envelope consists of a header and a body. The header is defined the following way in native protocol version 3 and later: 0 8 16 24 32 40 +---------+---------+---------+---------+---------+ | version | flags | stream | opcode | +---------+---------+---------+---------+---------+ | length | +---------+---------+---------+---------+
-
-
Method Details
-
retain
public void retain() -
release
public boolean release() -
clone
-
create
public static Envelope create(Message.Type type, int streamId, ProtocolVersion version, EnumSet<Envelope.Header.Flag> flags, io.netty.buffer.ByteBuf body) -
encodeHeader
public io.netty.buffer.ByteBuf encodeHeader() -
encodeHeaderInto
-
encodeInto
-
with
-