public class MutableDirectoryPageData extends Object implements IDirectoryData
IDirectoryData
record which operate by direct manipulation of the Java objects.
Note: package private fields are used so that they may be directly accessed
by the DirectoryPage
class.
Constructor and Description |
---|
MutableDirectoryPageData(byte[] overflowKey,
int addressBits,
boolean hasVersionTimestamps)
Create an empty mutable data record.
|
MutableDirectoryPageData(byte[] overflowKey,
long[] childAddr,
boolean hasVersionTimestamps,
long minimumVersionTimestamp,
long maximumVersionTimestamp)
Ctor based on just the "data" -- used by unit tests.
|
MutableDirectoryPageData(int addressBits,
IDirectoryData src)
Makes a mutable copy of the source data record.
|
Modifier and Type | Method and Description |
---|---|
AbstractFixedByteArrayBuffer |
data()
The coded (aka compressed) data.
|
long |
getChildAddr(int index)
Return the persistent addresses of the specified child node.
|
int |
getChildCount()
The #of children of this node.
|
long |
getMaximumVersionTimestamp()
The most recent tuple revision timestamp associated with any tuple
spanned by this node or leaf.
|
long |
getMinimumVersionTimestamp()
The earliest tuple revision timestamp associated with any tuple spanned
by this node or leaf.
|
byte[] |
getOverflowKey()
If this is an overflow directory, then there is a single key for which
the directory will reference multiple BucketPages storing the associated
values.
|
boolean |
hasVersionTimestamps()
Return
true iff the leaves maintain tuple revision
timestamps. |
boolean |
isCoded()
No.
|
boolean |
isLeaf()
True iff this is a leaf node.
|
boolean |
isOverflowDirectory()
true iff this is an overflow directory page. |
boolean |
isReadOnly()
No - this is a mutable data record.
|
public MutableDirectoryPageData(byte[] overflowKey, int addressBits, boolean hasVersionTimestamps)
addressBits
- The #of address bits.hasVersionTimestamps
- true
iff the HTree is maintaining per tuple
version timestamps.public MutableDirectoryPageData(int addressBits, IDirectoryData src)
addressBits
- The #of address bits owning HTree
. This is used to
initialize the various arrays to the correct capacity.src
- The source data record.public MutableDirectoryPageData(byte[] overflowKey, long[] childAddr, boolean hasVersionTimestamps, long minimumVersionTimestamp, long maximumVersionTimestamp)
nentries
- keys
- childAddr
- childEntryCounts
- public final boolean isReadOnly()
isReadOnly
in interface IAbstractNodeData
public final boolean isCoded()
isCoded
in interface IAbstractNodeData
public final AbstractFixedByteArrayBuffer data()
IAbstractNodeData
data
in interface IAbstractNodeData
data
in interface IDataRecordAccess
public final long getChildAddr(int index)
IChildData
getChildAddr
in interface IChildData
index
- The index of the child in [0:nkeys].public final int getChildCount()
IAbstractNodeData#getKeyCount()
+1
Overridden to report the size of the address space.
getChildCount
in interface IChildData
public final boolean isOverflowDirectory()
IDirectoryData
true
iff this is an overflow directory page. An overflow
directory page is created when a bucket page overflows as the parent of
that bucket page. The children of the overflow directory page may be
other overflow directory pages or bucket pages. All bucket pages below an
overflow directory page will have the same key. That key is recorded once
in each overflow bucket page.isOverflowDirectory
in interface IDirectoryData
public final boolean isLeaf()
IAbstractNodeData
isLeaf
in interface IAbstractNodeData
public final boolean hasVersionTimestamps()
IAbstractNodeData
true
iff the leaves maintain tuple revision
timestamps. When true
, the minimum and maximum tuple
revision timestamp for a node or leaf are available from
IAbstractNodeData.getMinimumVersionTimestamp()
and
IAbstractNodeData.getMaximumVersionTimestamp()
.hasVersionTimestamps
in interface IAbstractNodeData
public final long getMaximumVersionTimestamp()
IAbstractNodeData
Long.MIN_VALUE
since the initial value of the
maximum version timestamp is always the smallest possible long integer.getMaximumVersionTimestamp
in interface IAbstractNodeData
public final long getMinimumVersionTimestamp()
IAbstractNodeData
Long.MAX_VALUE
since the initial value of the minimum
version timestamp is always the largest possible long integer.getMinimumVersionTimestamp
in interface IAbstractNodeData
public byte[] getOverflowKey()
IDirectoryData
getOverflowKey
in interface IDirectoryData
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.