- All Known Implementing Classes:
InboundMessageState.PartialBitfield
interface ACKBitfield
Generic means of SACK/NACK transmission for partially or fully received messages.
Method Summary
All MethodsModifier and TypeMethodDescriptionintackCount()Number of fragments acked in this bitfield.intThe number of fragments covered in this bitfield.longThe message ID this is partially ACKing.intHighest fragment number acked in this bitfield.booleanreceived(int fragmentNum) Check if the given fragment has been received.booleanCheck 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 throughreceived(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