Class Chunk


  • public class Chunk
    extends Packet
    • Constructor Detail

      • Chunk

        public Chunk​(long chunkMaxSize)
    • Method Detail

      • getSize

        public int getSize()
        Description copied from class: Packet
        This method returns the total occupied memory size of this packet. This functionality is used by the backlog protocol feature to calculate the total backlog queue size.
        Specified by:
        getSize in class Packet
        Returns:
        The total memory size occupied by this packet
      • getPacketType

        public PacketType getPacketType()
        Description copied from class: Packet
        Intended to return the type of the packet.
        Specified by:
        getPacketType in class Packet
        Returns:
        The type of this packet. Please see the PacketType type for a list of available packet types
      • compilePacket

        public void compilePacket​(Packet packet)
                           throws IOException
        Compile but don't add to the chunk yet.
        Parameters:
        packet - packet to compile
        Throws:
        IOException - io exception
      • canFitFormattedPacket

        public boolean canFitFormattedPacket()
      • millisecondsSinceTheFirstPacket

        public long millisecondsSinceTheFirstPacket()