public class FSTAsciiStringOffheapMap<V> extends FSTSerializedOffheapMap<String,V>
FSTBinaryOffheapMap.KeyValIterbuffer, tmpValalloc, bytezOffset, CORE_HEADER_LEN, CUSTOM_FILEHEADER_LEN, customHeader, FILE_HEADER_LEN, freeList, GB, index, KEY_OFFSET_IN_HEADER, keyLen, mappedFile, MB, memory, numElem| Constructor and Description |
|---|
FSTAsciiStringOffheapMap(int keyLen,
long sizeMemBytes,
int numberOfEleems) |
FSTAsciiStringOffheapMap(int keyLen,
long sizeMemBytes,
int numberOfEleems,
FSTCoder coder)
see other mem constructor, additional allows to insert a coder.
|
FSTAsciiStringOffheapMap(String file,
int keylen,
long size,
int numelem)
create a memory mapped offheap hashmap
|
FSTAsciiStringOffheapMap(String mappedFile,
int keyLen,
long sizeMemBytes,
int numberOfElems,
FSTCoder coder)
see other mem mapped file constructor + additional allows to insert a coder.
|
| Modifier and Type | Method and Description |
|---|---|
ByteSource |
encodeKey(String key) |
decodeValue, encodeValue, getCoder, getEntryLengthForContentLengthget, put, remove, valuesaddEntry, addToFreeList, binaryKeys, binaryValues, decElems, dumpIndexStats, finalize, free, getBinary, getCapacityMB, getContentLenFromHeader, getCustomFileHeader, getFreeMem, getHeaderLen, getLenFromHeader, getSize, getUsedMem, incElems, init, initFromFile, printBinaryKey, putBinary, removeBinary, removeEntry, setEntry, writeEntryHeaderpublic FSTAsciiStringOffheapMap(int keyLen,
long sizeMemBytes,
int numberOfEleems,
FSTCoder coder)
public FSTAsciiStringOffheapMap(int keyLen,
long sizeMemBytes,
int numberOfEleems)
keyLen - - maximum len of a keysizeMemBytes - - size of memory (not bigger than OS heapnumberOfEleems - - estimation on number of key-value pairs (autogrow, just educated guess)public FSTAsciiStringOffheapMap(String mappedFile, int keyLen, long sizeMemBytes, int numberOfElems, FSTCoder coder) throws Exception
Exceptionpublic FSTAsciiStringOffheapMap(String file, int keylen, long size, int numelem) throws Exception
file - - the file location. If file exists, it will be loaded
Attention: in case classes changed you need to delete files as
objects won't be compatible (except you made use of fst versioning features)keylen - - the maximum len of a keysize - - max size of file (can be GB, check OS settings to avoid eager write-to-disk)numelem - - estimated number of key-value pairs (will auto-grow, just educated guess)Exceptionpublic ByteSource encodeKey(String key)
encodeKey in class FSTCodedOffheapMap<String,V>Copyright © 2015. All rights reserved.