public class SegmentId extends Object implements Comparable<SegmentId>
| Constructor and Description |
|---|
SegmentId(SegmentStore store,
long msb,
long lsb) |
| Modifier and Type | Method and Description |
|---|---|
UUID |
asUUID() |
int |
compareTo(SegmentId that) |
boolean |
equals(Object object) |
int |
estimateMemoryUsage() |
long |
getCreationTime() |
int |
getGcGeneration()
Get the underlying segment's gc generation.
|
long |
getLeastSignificantBits() |
long |
getMostSignificantBits() |
Segment |
getSegment()
Get the segment identified by this instance.
|
int |
hashCode() |
boolean |
isBulkSegmentId()
Checks whether this is a bulk segment identifier.
|
boolean |
isDataSegmentId()
Checks whether this is a data segment identifier.
|
static boolean |
isDataSegmentId(long lsb)
Checks whether this is a data segment identifier.
|
void |
reclaimed(String gcInfo)
Notify this id about the reclamation of its segment (e.g.
|
boolean |
sameStore(SegmentStore store)
Determine whether this instance belongs to the passed
store |
String |
toString() |
public SegmentId(@Nonnull SegmentStore store, long msb, long lsb)
public static boolean isDataSegmentId(long lsb)
true for a data segment, false otherwisepublic boolean isDataSegmentId()
true for a data segment, false otherwisepublic boolean isBulkSegmentId()
true for a bulk segment, false otherwisepublic long getMostSignificantBits()
public long getLeastSignificantBits()
@Nonnull public Segment getSegment()
segment field.loaded(Segment),
unloaded()public void reclaimed(@Nonnull String gcInfo)
gcInfo - details about the reclamation. This information
is logged along with the SegmentNotFoundException
when attempting to resolve the segment of this id.public boolean sameStore(@Nonnull SegmentStore store)
storestore - true iff this instance belongs to storepublic long getCreationTime()
public UUID asUUID()
public int getGcGeneration()
public int compareTo(@Nonnull SegmentId that)
compareTo in interface Comparable<SegmentId>public int estimateMemoryUsage()
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.