private short putInternal(byte[] stored) {
      if (currSize < initSize) {
        // There is space to add without evicting.
        if (indexToNode[currSize] == null) {
          indexToNode[currSize] = new ByteArrayBackedNode();
        }
        indexToNode[currSize].setContents(stored, 0, stored.length);
        setHead(indexToNode[currSize]);
        short ret = (short) currSize++;
        nodeToIndex.put(indexToNode[ret], ret);
        return ret;
      } else {
        short s = nodeToIndex.remove(tail);
        tail.setContents(stored, 0, stored.length);
        // we need to rehash this.
        nodeToIndex.put(tail, s);
        moveToHead(tail);
        return s;
      }
    }
WALDictionary using an LRU eviction algorithm. Uses a linked list running through a hashtable.
Currently has max of 2^15 entries. Will start evicting if exceeds this number The maximum memory
we expect this dictionary to take in the worst case is about:
<code>(2 ^ 15) * 5 (Regionname, Row key, CF, Column qual, table) * 100 bytes
(these are some big names) = ~16MB</code>. If you want to get silly, even at 1kb entries, it
maxes out at 160 megabytes.
hbase-common/src/main/java/org/apache/hadoop/hbase/io/util/LRUDictionary.java