Class BookieProtocol.PacketHeader

java.lang.Object
org.apache.bookkeeper.proto.BookieProtocol.PacketHeader
Enclosing interface:
BookieProtocol

public static final class BookieProtocol.PacketHeader extends 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 Details

    • PacketHeader

      public PacketHeader()
  • Method Details

    • toInt

      public static int toInt(byte version, byte opCode, short flags)
    • getVersion

      public static byte getVersion(int packetHeader)
    • getOpCode

      public static byte getOpCode(int packetHeader)
    • getFlags

      public static short getFlags(int packetHeader)