Class SequenceNumberRange.GenericSequenceNumberRange
- java.lang.Object
-
- org.apache.flink.runtime.state.changelog.SequenceNumberRange.GenericSequenceNumberRange
-
- All Implemented Interfaces:
SequenceNumberRange
- Enclosing interface:
- SequenceNumberRange
public static class SequenceNumberRange.GenericSequenceNumberRange extends Object implements SequenceNumberRange
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.runtime.state.changelog.SequenceNumberRange
SequenceNumberRange.GenericSequenceNumberRange
-
-
Constructor Summary
Constructors Constructor Description GenericSequenceNumberRange(SequenceNumber.GenericSequenceNumber from, SequenceNumber.GenericSequenceNumber to)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(SequenceNumber sqn)
SequenceNumber
from()
Inclusive.boolean
isEmpty()
long
size()
SequenceNumber
to()
Exclusive.String
toString()
-
-
-
Constructor Detail
-
GenericSequenceNumberRange
public GenericSequenceNumberRange(SequenceNumber.GenericSequenceNumber from, SequenceNumber.GenericSequenceNumber to)
-
-
Method Detail
-
from
public SequenceNumber from()
Description copied from interface:SequenceNumberRange
Inclusive.- Specified by:
from
in interfaceSequenceNumberRange
-
to
public SequenceNumber to()
Description copied from interface:SequenceNumberRange
Exclusive.- Specified by:
to
in interfaceSequenceNumberRange
-
size
public long size()
- Specified by:
size
in interfaceSequenceNumberRange
- Returns:
- the size of this range (positive) or zero if it is empty
-
contains
public boolean contains(SequenceNumber sqn)
- Specified by:
contains
in interfaceSequenceNumberRange
- Returns:
- true if
SequenceNumberRange.from()
≤ sqn <SequenceNumberRange.to()
(this implies that the range is not empty, i.e. to > from)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceSequenceNumberRange
- Returns:
- true if
SequenceNumberRange.from()
≥SequenceNumberRange.to()
, false otherwise.
-
-