Package org.apache.bookkeeper.proto
Class BookieProtocol.PacketHeader
- java.lang.Object
-
- org.apache.bookkeeper.proto.BookieProtocol.PacketHeader
-
- Enclosing interface:
- BookieProtocol
public static final class BookieProtocol.PacketHeader extends java.lang.Object
The first int of a packet is the header. It contains the version, opCode and flags. The initial versions of BK didn't have this structure and just had an int representing the opCode as the first int. This handles that case also.
-
-
Constructor Summary
Constructors Constructor Description PacketHeader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static short
getFlags(int packetHeader)
static byte
getOpCode(int packetHeader)
static byte
getVersion(int packetHeader)
static int
toInt(byte version, byte opCode, short flags)
-