Package org.jgroups.util
Class SeqnoRange
- java.lang.Object
-
- org.jgroups.util.Seqno
-
- org.jgroups.util.SeqnoRange
-
public class SeqnoRange extends Seqno
Keeps track of a range of messages to be retransmitted. A bit set is used to represent missing messages. Every non-received message has a corresponding bit set to 0, every received message is 1.- Author:
- Bela Ban
-
-
Constructor Summary
Constructors Constructor Description SeqnoRange(long low, long high)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear(long num)
void
clear(long... nums)
boolean
contains(long num)
boolean
get(long num)
java.util.Collection<Range>
getBits(boolean value)
Returns ranges of all bit set to valuelong
getHigh()
protected int
getIndex(long num)
java.util.Collection<Range>
getMessagesToRetransmit()
int
getNumberOfMissingMessages()
int
getNumberOfReceivedMessages()
java.lang.String
print()
java.lang.String
printBits(boolean value)
void
set(long num)
void
set(long... nums)
int
size()
java.lang.String
toString()
-
-
-
Method Detail
-
getHigh
public long getHigh()
-
set
public void set(long... nums)
-
clear
public void clear(long... nums)
-
getNumberOfReceivedMessages
public int getNumberOfReceivedMessages()
- Overrides:
getNumberOfReceivedMessages
in classSeqno
-
getNumberOfMissingMessages
public int getNumberOfMissingMessages()
- Overrides:
getNumberOfMissingMessages
in classSeqno
-
getMessagesToRetransmit
public java.util.Collection<Range> getMessagesToRetransmit()
- Overrides:
getMessagesToRetransmit
in classSeqno
-
getIndex
protected int getIndex(long num)
-
printBits
public java.lang.String printBits(boolean value)
-
getBits
public java.util.Collection<Range> getBits(boolean value)
Returns ranges of all bit set to value- Parameters:
value
- If true, returns all bits set to 1, else 0- Returns:
-
-