|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<IndexSegmentRegion>
com.bigdata.btree.IndexSegmentRegion
public enum IndexSegmentRegion
Type-safe enumeration of the regions to which relative offsets may be
constructed for an IndexSegmentStore.
IndexSegmentBuilder,
IndexSegmentStore,
IndexSegmentCheckpoint| Enum Constant Summary | |
|---|---|
BASE
Offset is relative to the start of the backing file. |
|
BLOB
Offset is relative to the start of the blob region. |
|
NODE
Offset is relative to the start of the node region. |
|
| Field Summary | |
|---|---|
protected static long |
NBITS
The #of bits that are used to indicate the IndexSegmentRegion on an
encoded address. |
| Method Summary | |
|---|---|
int |
code()
|
static long |
decodeOffset(long encodedOffset)
Return the decoded offset (right-shifts by NBITS in
order to strip off the bits used to encode the region). |
static IndexSegmentRegion |
decodeRegion(long encodedOffset)
Return the decoded region from an encoded offset. |
long |
encodeOffset(long offset)
Encode an offset within a region. |
static IndexSegmentRegion |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static IndexSegmentRegion[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final IndexSegmentRegion BASE
Note: The BASE region runs from the start of the file until the
end of the file and thus overlaps both the NODE and
BLOB regions. Any address may be expressed within the
BASE region.
Note: The leaves are not really their own region, but rather are found
within the BASE region starting at [leavesOffset] and running
for [leavesExtent] bytes.
public static final IndexSegmentRegion NODE
public static final IndexSegmentRegion BLOB
| Field Detail |
|---|
protected static final long NBITS
IndexSegmentRegion on an
encoded address. Since the address is encoded in a 64-bit long, the
#of bits available to encode the offset and byteCount of the address
is reduced by this many bits.
| Method Detail |
|---|
public static IndexSegmentRegion[] values()
for (IndexSegmentRegion c : IndexSegmentRegion.values()) System.out.println(c);
public static IndexSegmentRegion valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic int code()
public long encodeOffset(long offset)
NBITS and the low bits are set to indicate the region that
identifies the base for the offset.
Note: This effectively reduces the maximum usable offset for the
IndexSegmentStore by NBITS
offset - The offset of the allocation.
public static IndexSegmentRegion decodeRegion(long encodedOffset)
encodedOffset - The encoded offset.
public static long decodeOffset(long encodedOffset)
NBITS in
order to strip off the bits used to encode the region). The
returned offset is relative to the encoded region. The caller
MUST adjust the offset appropriately in order to de-reference
the record in the store.
encodedOffset - The encoded offset.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||