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.ObjectThe 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 shortgetFlags(int packetHeader)static bytegetOpCode(int packetHeader)static bytegetVersion(int packetHeader)static inttoInt(byte version, byte opCode, short flags)
-