public static class IndexData.Entry extends java.lang.Object implements java.lang.Comparable<IndexData.Entry>
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
_entryBytes
the entry value
|
private RowIdImpl |
_rowId
page/row on which this row is stored
|
private IndexData.EntryType |
_type
comparable type for the entry
|
| Modifier | Constructor and Description |
|---|---|
private |
Entry(byte[] entryBytes,
RowIdImpl rowId)
Create a new entry
|
private |
Entry(byte[] entryBytes,
RowIdImpl rowId,
IndexData.EntryType type)
Create a new entry
|
private |
Entry(java.nio.ByteBuffer buffer,
int entryLen)
Read an existing entry in from a buffer
|
private |
Entry(java.nio.ByteBuffer buffer,
int entryLen,
int extraTrailingLen)
Read an existing entry in from a buffer
|
| Modifier and Type | Method and Description |
|---|---|
protected IndexData.Entry |
asNodeEntry(java.lang.Integer subPageNumber)
Returns a copy of this entry as a node Entry with the given
subPageNumber.
|
int |
compareTo(IndexData.Entry other) |
protected org.apache.commons.lang.builder.ToStringBuilder |
entryBytesToStringBuilder(org.apache.commons.lang.builder.ToStringBuilder sb) |
boolean |
equals(java.lang.Object o) |
boolean |
equalsEntryBytes(IndexData.Entry o) |
protected byte[] |
getEntryBytes() |
RowIdImpl |
getRowId() |
java.lang.Integer |
getSubPageNumber() |
IndexData.EntryType |
getType() |
int |
hashCode() |
boolean |
isLeafEntry() |
boolean |
isValid() |
protected int |
size()
Size of this entry in the db.
|
java.lang.String |
toString() |
protected void |
write(java.nio.ByteBuffer buffer,
byte[] prefix)
Write this entry into a buffer
|
private final RowIdImpl _rowId
private final byte[] _entryBytes
private final IndexData.EntryType _type
private Entry(byte[] entryBytes,
RowIdImpl rowId,
IndexData.EntryType type)
entryBytes - encoded bytes for this index entryrowId - rowId in which the row is storedtype - the type of the entryprivate Entry(byte[] entryBytes,
RowIdImpl rowId)
entryBytes - encoded bytes for this index entryrowId - rowId in which the row is storedprivate Entry(java.nio.ByteBuffer buffer,
int entryLen)
throws java.io.IOException
java.io.IOExceptionprivate Entry(java.nio.ByteBuffer buffer,
int entryLen,
int extraTrailingLen)
throws java.io.IOException
java.io.IOExceptionpublic RowIdImpl getRowId()
public IndexData.EntryType getType()
public java.lang.Integer getSubPageNumber()
public boolean isLeafEntry()
public boolean isValid()
protected final byte[] getEntryBytes()
protected int size()
protected void write(java.nio.ByteBuffer buffer,
byte[] prefix)
throws java.io.IOException
java.io.IOExceptionprotected final org.apache.commons.lang.builder.ToStringBuilder entryBytesToStringBuilder(org.apache.commons.lang.builder.ToStringBuilder sb)
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic boolean equalsEntryBytes(IndexData.Entry o)
true iff the entryBytes are equal between this
Entry and the given Entrypublic int compareTo(IndexData.Entry other)
compareTo in interface java.lang.Comparable<IndexData.Entry>protected IndexData.Entry asNodeEntry(java.lang.Integer subPageNumber)