com.sleepycat.je.tree
Class INKeyRep

java.lang.Object
  extended by com.sleepycat.je.tree.INArrayRep<INKeyRep,INKeyRep.Type,byte[]>
      extended by com.sleepycat.je.tree.INKeyRep
Direct Known Subclasses:
INKeyRep.Default, INKeyRep.MaxKeySize

public abstract class INKeyRep
extends INArrayRep<INKeyRep,INKeyRep.Type,byte[]>

The abstract class that defines the various representation used to represent the keys associated with the IN node. There are currently two supported representations:

  1. A default representation Default that's capable of holding any set of keys.
  2. A compact representation MaxKeySize that's more efficient for holding small keys (<= 16 bytes) in length. If key prefixing is in use this represents the unprefixed part of the key, since that's what is stored in this array.

The choice of representation is made when an IN node is first read in from the log. The MaxKeySize representation is only used when it is more storage efficient than the default representation for the set of keys currently associated with the IN.

Note that no attempt is currently made to optimize the storage representation as keys are added to, or removed from, the Default representation to minimize the chances of transitionary "back and forth" representation changes that could prove to be expensive.


Nested Class Summary
static class INKeyRep.Default
          The default representation that's capable of storing keys of any size.
static class INKeyRep.MaxKeySize
          The compact representation that can be used to represent keys <= 16 bytes in length.
static class INKeyRep.Type
           
 
Field Summary
 
Fields inherited from class com.sleepycat.je.tree.INArrayRep
parent
 
Constructor Summary
INKeyRep(IN parent)
           
 
Method Summary
 
Methods inherited from class com.sleepycat.je.tree.INArrayRep
calculateMemorySize, compact, copy, get, getType, length, noteRepChange, noteRepChange, set, updateCacheStats, updateCacheStats
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

INKeyRep

public INKeyRep(IN parent)


Copyright (c) 2004-2010 Oracle. All rights reserved.