@InterfaceAudience.Private public class LRUDictionary extends Object implements Dictionary
(2 ^ 15) * 5 (Regionname, Row key, CF, Column qual, table) * 100 bytes
 (these are some big names) = ~16MB. If you want to get silly, even at 1kb entries, it
 maxes out at 160 megabytes.| Modifier and Type | Class and Description | 
|---|---|
(package private) static class  | 
LRUDictionary.BidirectionalLRUMap  | 
| Modifier and Type | Field and Description | 
|---|---|
(package private) LRUDictionary.BidirectionalLRUMap | 
backingStore  | 
NOT_IN_DICTIONARY| Constructor and Description | 
|---|
LRUDictionary()  | 
| Modifier and Type | Method and Description | 
|---|---|
short | 
addEntry(byte[] data,
        int offset,
        int length)
Adds an entry to the dictionary. 
 | 
private short | 
addEntryInternal(byte[] data,
                int offset,
                int length,
                boolean copy)  | 
void | 
clear()
Flushes the dictionary, empties all values. 
 | 
short | 
findEntry(byte[] data,
         int offset,
         int length)
Finds the index of an entry. 
 | 
short | 
findEntry(ByteBuffer data,
         int offset,
         int length)
Finds the index of an entry. 
 | 
byte[] | 
getEntry(short idx)
Gets an entry from the dictionary. 
 | 
void | 
init(int initialSize)  | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwrite, writeLRUDictionary.BidirectionalLRUMap backingStore
public LRUDictionary()
public byte[] getEntry(short idx)
DictionarygetEntry in interface Dictionaryidx - index of the entrypublic void init(int initialSize)
init in interface Dictionarypublic short findEntry(byte[] data, int offset, int length)
DictionaryfindEntry in interface Dictionarydata - the byte array that we're looking upoffset - Offset into data to add to Dictionary.length - Length beyond offset that comprises entry; must be > 0.Dictionary.NOT_IN_DICTIONARY if not foundpublic short addEntry(byte[] data, int offset, int length)
DictionaryDictionary.findEntry(byte[], int, int)} to add without duplicating dictionary entries.addEntry in interface Dictionarydata - the entry to addoffset - Offset into data to add to Dictionary.length - Length beyond offset that comprises entry; must be > 0.private short addEntryInternal(byte[] data, int offset, int length, boolean copy)
public void clear()
Dictionaryclear in interface Dictionarypublic short findEntry(ByteBuffer data, int offset, int length)
DictionaryfindEntry in interface Dictionarydata - the ByteBuffer that we're looking upoffset - Offset into data to add to Dictionary.length - Length beyond offset that comprises entry; must be > 0.Dictionary.NOT_IN_DICTIONARY if not foundCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.