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 |
SeqnoRange(long low,
long high)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
SeqnoRange
public SeqnoRange(long low,
long high)
getHigh
public long getHigh()
contains
public boolean contains(long num)
- Overrides:
contains
in class Seqno
get
public boolean get(long num)
- Overrides:
get
in class Seqno
set
public void set(long num)
- Overrides:
set
in class Seqno
set
public void set(long... nums)
clear
public void clear(long num)
- Overrides:
clear
in class Seqno
clear
public void clear(long... nums)
getNumberOfReceivedMessages
public int getNumberOfReceivedMessages()
- Overrides:
getNumberOfReceivedMessages
in class Seqno
getNumberOfMissingMessages
public int getNumberOfMissingMessages()
- Overrides:
getNumberOfMissingMessages
in class Seqno
size
public int size()
- Overrides:
size
in class Seqno
getMessagesToRetransmit
public java.util.Collection<Range> getMessagesToRetransmit()
- Overrides:
getMessagesToRetransmit
in class Seqno
toString
public java.lang.String toString()
- Overrides:
toString
in class Seqno
print
public java.lang.String print()
- Overrides:
print
in class Seqno
getIndex
protected int getIndex(int 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:
Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.