INKeyRep.Default, INKeyRep.MaxKeySize, INKeyRep.Type
Constructor and Description |
---|
INKeyRep.Default(int nodeMaxEntries) |
INKeyRep.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.
|
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.
|
INKeyRep.Type |
getType() |
int |
length() |
INKeyRep |
set(int idx,
byte[] key,
IN parent)
Sets the array element at idx to the node.
|
(package private) void |
updateCacheStats(boolean increment,
Evictor evictor)
Update the cache statistics for this representation.
|
noteRepChange, updateCacheStats
INKeyRep.Default(int nodeMaxEntries)
public INKeyRep.Default(SizeofMarker marker)
public INKeyRep.Type getType()
getType
in class INArrayRep<INKeyRep,INKeyRep.Type,byte[]>
public byte[] get(int idx)
INArrayRep
get
in class INArrayRep<INKeyRep,INKeyRep.Type,byte[]>
public INKeyRep set(int idx, byte[] key, IN parent)
INArrayRep
set
in class INArrayRep<INKeyRep,INKeyRep.Type,byte[]>
idx
- the index to be setkey
- the array elelement at the idxpublic INKeyRep copy(int from, int to, int n, IN parent)
INArrayRep
copy
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 long calculateMemorySize()
INArrayRep
calculateMemorySize
in class INArrayRep<INKeyRep,INKeyRep.Type,byte[]>
public INKeyRep compact(IN parent)
compact
in class INArrayRep<INKeyRep,INKeyRep.Type,byte[]>
public boolean accountsForKeyByteMemUsage()
INKeyRep
accountsForKeyByteMemUsage
in class INKeyRep
void updateCacheStats(boolean increment, Evictor evictor)
INArrayRep
updateCacheStats
in class INArrayRep<INKeyRep,INKeyRep.Type,byte[]>
increment
- true the stat should be incremented, false if it must
be decrementedevictor
- the evictor that shoulds ths stat counters#updateCacheStats(boolean)
Copyright (c) 2004-2012 Oracle. All rights reserved.