public class SeqnoList extends java.lang.Object implements Streamable, java.lang.Iterable<java.lang.Long>
限定符和类型 | 类和说明 |
---|---|
protected static class |
SeqnoList.Seqno |
protected class |
SeqnoList.SeqnoListIterator |
protected static class |
SeqnoList.SeqnoRange |
限定符和类型 | 字段和说明 |
---|---|
protected java.util.List<SeqnoList.Seqno> |
seqnos |
限定符和类型 | 方法和说明 |
---|---|
SeqnoList |
add(long... seqnos) |
SeqnoList |
add(long seqno)
Adds a single seqno
|
SeqnoList |
add(long from,
long to)
Adds a seqno range
|
long |
getLast()
Returns the last seqno, this should also be the highest seqno in the list as we're supposed to add seqnos
in order
|
java.util.Iterator<java.lang.Long> |
iterator() |
void |
readFrom(java.io.DataInput in)
Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
|
void |
remove(long min_seqno)
Removes all seqnos <= seqno
|
void |
removeHigherThan(long max_seqno)
Removes all seqnos > seqno
|
int |
serializedSize() |
int |
size() |
java.lang.String |
toString() |
void |
writeTo(java.io.DataOutput out)
Write the entire state of the current object (including superclasses) to outstream.
|
protected final java.util.List<SeqnoList.Seqno> seqnos
public SeqnoList()
public SeqnoList(long seqno)
public SeqnoList(long from, long to)
public SeqnoList add(long seqno)
public SeqnoList add(long... seqnos)
public SeqnoList add(long from, long to)
public void remove(long min_seqno)
public void removeHigherThan(long max_seqno)
public long getLast()
public void writeTo(java.io.DataOutput out) throws java.lang.Exception
Streamable
writeTo
在接口中 Streamable
java.lang.Exception
public void readFrom(java.io.DataInput in) throws java.lang.Exception
Streamable
readFrom
在接口中 Streamable
java.lang.Exception
public int serializedSize()
public int size()
public java.lang.String toString()
toString
在类中 java.lang.Object
public java.util.Iterator<java.lang.Long> iterator()
iterator
在接口中 java.lang.Iterable<java.lang.Long>