All Known Implementing Classes:
InboundMessageState.PartialBitfield

interface ACKBitfield
Generic means of SACK/NACK transmission for partially or fully received messages.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    int
    Number of fragments acked in this bitfield.
    int
    The number of fragments covered in this bitfield.
    long
    The message ID this is partially ACKing.
    int
    Highest fragment number acked in this bitfield.
    boolean
    received(int fragmentNum)
    Check if the given fragment has been received.
    boolean
    Check if the entire message has been received completely.
  • Method Details

    • getMessageId

      long getMessageId()
      The message ID this is partially ACKing.
      Returns:
      the 32 bit message ID from the session's outbound sequence
    • fragmentCount

      int fragmentCount()
      The number of fragments covered in this bitfield.
      Returns:
      number of fragments
    • received

      boolean received(int fragmentNum)
      Check if the given fragment has been received.
      Parameters:
      fragmentNum - fragment number to check
      Returns:
      true if fragment has been received
    • receivedComplete

      boolean receivedComplete()
      Check if the entire message has been received completely.
      Returns:
      true if message has been completely received
    • ackCount

      int ackCount()
      Number of fragments acked in this bitfield. Faster than looping through received(int).
      Returns:
      number of fragments acked
    • highestReceived

      int highestReceived()
      Highest fragment number acked in this bitfield.
      Returns:
      highest fragment number acked, or -1 if none