Interface SegmentIdProvider
-
- All Known Implementing Classes:
SegmentTracker
public interface SegmentIdProvider
Instances of this class providesSegmentId
instances of a givenSegmentStore
and creates newSegmentId
instances on the fly if required.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getSegmentIdCount()
@NotNull SegmentId
newBulkSegmentId()
Provide aSegmentId
for a segment of type "data".@NotNull SegmentId
newDataSegmentId()
Provide aSegmentId
for a segment of type "bulk".@NotNull SegmentId
newSegmentId(long msb, long lsb)
Provide aSegmentId
represented by the given MSB/LSB pair.
-
-
-
Method Detail
-
getSegmentIdCount
int getSegmentIdCount()
- Returns:
- The number of distinct segment ids this provider is tracking.
-
newSegmentId
@NotNull @NotNull SegmentId newSegmentId(long msb, long lsb)
Provide aSegmentId
represented by the given MSB/LSB pair.- Parameters:
msb
- The most significant bits of theSegmentId
.lsb
- The least significant bits of theSegmentId
.- Returns:
- A non-
null
instance ofSegmentId
.
-
newDataSegmentId
@NotNull @NotNull SegmentId newDataSegmentId()
Provide aSegmentId
for a segment of type "bulk".- Returns:
- A non-
null
instance ofSegmentId
.
-
newBulkSegmentId
@NotNull @NotNull SegmentId newBulkSegmentId()
Provide aSegmentId
for a segment of type "data".- Returns:
- A non-
null
instance ofSegmentId
.
-
-