INKeyRep.Default, INKeyRep.MaxKeySize, INKeyRep.Type| Constructor and Description |
|---|
Default(SizeofMarker marker) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accountsForKeyByteMemUsage()
Returns true if the key bytes mem usage is accounted for internally
here, or false if each key has a separate byte array and its mem usage
is accounted for by the parent.
|
long |
calculateMemorySize()
Returns the current memory size of the underlying representation in
bytes.
|
INKeyRep |
compact(IN parent)
Evolves to the MaxKeySize representation if that is more efficient
for the current set of keys.
|
int |
compareKeys(byte[] searchKey,
byte[] prefix,
int idx,
boolean embeddedData,
Comparator<byte[]> comparator) |
INKeyRep |
copy(int from,
int to,
int n,
IN parent)
Copies n elements at index denoted by "from" to the index denoted by
"to".
|
byte[] |
get(int idx)
Returns the element at idx.
|
byte[] |
getData(int idx) |
byte[] |
getFullKey(byte[] prefix,
int idx,
boolean embeddedData) |
byte[] |
getKey(int idx,
boolean embeddedData) |
INKeyRep.Type |
getType() |
int |
length() |
INKeyRep |
resize(int capacity)
Changes the capacity, either truncating existing elements at the end if
the capacity is reduced, or adding empty elements at the end if the
capacity is enlarged.
|
INKeyRep |
set(int idx,
byte[] key,
byte[] data,
IN parent) |
INKeyRep |
set(int idx,
byte[] key,
IN parent)
Sets the array element at idx to the node.
|
INKeyRep |
setData(int idx,
byte[] data,
IN parent) |
int |
size(int idx) |
public Default(SizeofMarker marker)
public INKeyRep resize(int capacity)
INArrayRepresize in class INArrayRep<INKeyRep,INKeyRep.Type,byte[]>public INKeyRep.Type getType()
getType in class INArrayRep<INKeyRep,INKeyRep.Type,byte[]>public INKeyRep set(int idx, byte[] key, IN parent)
INArrayRepset in class INArrayRep<INKeyRep,INKeyRep.Type,byte[]>idx - the index to be setkey - the array elelement at the idxpublic byte[] get(int idx)
INArrayRepget in class INArrayRep<INKeyRep,INKeyRep.Type,byte[]>public byte[] getFullKey(byte[] prefix,
int idx,
boolean embeddedData)
getFullKey in class INKeyReppublic int compareKeys(byte[] searchKey,
byte[] prefix,
int idx,
boolean embeddedData,
Comparator<byte[]> comparator)
compareKeys in class INKeyReppublic INKeyRep copy(int from, int to, int n, IN parent)
INArrayRepcopy in class INArrayRep<INKeyRep,INKeyRep.Type,byte[]>from - the source (inclusive) of the copyto - the target (inclusive) of the copyn - the number of elements to be copied.public INKeyRep compact(IN parent)
compact in class INArrayRep<INKeyRep,INKeyRep.Type,byte[]>public long calculateMemorySize()
INArrayRepcalculateMemorySize in class INArrayRep<INKeyRep,INKeyRep.Type,byte[]>public boolean accountsForKeyByteMemUsage()
INKeyRepaccountsForKeyByteMemUsage in class INKeyRepCopyright © 2024. All rights reserved.