|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.tree.INArrayRep<INTargetRep,INTargetRep.Type,Node>
com.sleepycat.je.tree.INTargetRep
com.sleepycat.je.tree.INTargetRep.Sparse
public static class INTargetRep.Sparse
Representation used when 1-4 children are cached. Note that the IN itself may have more children, but they are not currently cached. The INArrayRep is represented by two parallel arrays: an array of indices (idxs) and an array of values (targets). All elements that are not explicitly represented are null.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.sleepycat.je.tree.INTargetRep |
---|
INTargetRep.Default, INTargetRep.None, INTargetRep.Sparse, INTargetRep.Type |
Field Summary | |
---|---|
(package private) short[] |
idxs
|
static int |
MAX_ENTRIES
|
static int |
MAX_INDEX
|
(package private) Node[] |
targets
|
Fields inherited from class com.sleepycat.je.tree.INTargetRep |
---|
NONE |
Constructor Summary | |
---|---|
INTargetRep.Sparse(int capacity)
|
|
INTargetRep.Sparse(SizeofMarker marker)
|
Method Summary | |
---|---|
long |
calculateMemorySize()
Returns the current memory size of the underlying representation in bytes. |
INTargetRep |
compact(IN parent)
Chooses a more compact representation, if that's possible, otherwise does nothing. |
INTargetRep |
copy(int from,
int to,
int n,
IN parent)
Copies n elements at index denoted by "from" to the index denoted by "to". |
Node |
get(int j)
Returns the element at idx. |
INTargetRep.Type |
getType()
|
INTargetRep |
set(int j,
Node node,
IN parent)
Sets the array element at idx to the node. |
void |
updateCacheStats(boolean increment,
Evictor evictor)
Update the cache statistics for this representation. |
Methods inherited from class com.sleepycat.je.tree.INArrayRep |
---|
noteRepChange, updateCacheStats |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_ENTRIES
public static final int MAX_INDEX
final short[] idxs
final Node[] targets
Constructor Detail |
---|
public INTargetRep.Sparse(int capacity)
public INTargetRep.Sparse(SizeofMarker marker)
Method Detail |
---|
public INTargetRep.Type getType()
getType
in class INArrayRep<INTargetRep,INTargetRep.Type,Node>
public long calculateMemorySize()
INArrayRep
calculateMemorySize
in class INArrayRep<INTargetRep,INTargetRep.Type,Node>
public INTargetRep copy(int from, int to, int n, IN parent)
INArrayRep
copy
in class INArrayRep<INTargetRep,INTargetRep.Type,Node>
from
- the source (inclusive) of the copyto
- the target (inclusive) of the copyn
- the number of elements to be copied.
public Node get(int j)
INArrayRep
get
in class INArrayRep<INTargetRep,INTargetRep.Type,Node>
public INTargetRep set(int j, Node node, IN parent)
INArrayRep
set
in class INArrayRep<INTargetRep,INTargetRep.Type,Node>
j
- the index to be setnode
- the array elelement at the idx
public INTargetRep compact(IN parent)
INArrayRep
WARNING: This method must not change the memory size of the current representation and return 'this', without explicitly adjusting memory usage (via noteRepChange) before returning. Returning a new instance is the trigger for adjusting memory usage in the parent.
compact
in class INArrayRep<INTargetRep,INTargetRep.Type,Node>
public void updateCacheStats(boolean increment, Evictor evictor)
INArrayRep
updateCacheStats
in class INArrayRep<INTargetRep,INTargetRep.Type,Node>
increment
- true the stat should be incremented, false if it must
be decrementedevictor
- the evictor that shoulds ths stat counters#updateCacheStats(boolean)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |