Package org.nustaq.offheap
Class FSTSerializedOffheapMap<K,V>
java.lang.Object
org.nustaq.offheap.FSTBinaryOffheapMap
org.nustaq.offheap.FSTCodedOffheapMap<K,V>
org.nustaq.offheap.FSTSerializedOffheapMap<K,V>
- Direct Known Subclasses:
FSTAsciiStringOffheapMap,FSTLongOffheapMap,FSTUTFStringOffheapMap
An offheap map using serialization for Value Objects.
Note there are several wrappers to represent keys as ByteSource (see FSTAsciiStringOffheapMap for example)
this class is not threadsafe
-
Nested Class Summary
Nested classes/interfaces inherited from class org.nustaq.offheap.FSTBinaryOffheapMap
FSTBinaryOffheapMap.KeyValIter -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]protected FSTCoderprotected ByteArrayByteSourceFields inherited from class org.nustaq.offheap.FSTBinaryOffheapMap
alloc, bytezOffset, CORE_HEADER_LEN, CUSTOM_FILEHEADER_LEN, customHeader, FILE_HEADER_LEN, freeList, GB, index, KEY_OFFSET_IN_HEADER, keyLen, mappedFile, MB, memory, mutationCount, numElem -
Constructor Summary
ConstructorsConstructorDescriptionFSTSerializedOffheapMap(int keyLen, long sizeBytes, int numberOfElems, FSTCoder coder) FSTSerializedOffheapMap(String mappedFile, int keyLen, long sizeMemBytes, int numberOfElems, FSTCoder coder) -
Method Summary
Modifier and TypeMethodDescriptionencodeValue(V value) getCoder()protected intgetEntryLengthForContentLength(long lengthOfEntry) default is to let 100% room for later entry growth.Methods inherited from class org.nustaq.offheap.FSTCodedOffheapMap
encodeKey, get, put, remove, valuesMethods inherited from class org.nustaq.offheap.FSTBinaryOffheapMap
addEntry, addToFreeList, binaryKeys, binaryValues, decElems, dumpIndexStats, finalize, free, getBinary, getCapacityMB, getContentLenFromHeader, getCustomFileHeader, getFileName, getFreeMem, getHeaderLen, getLenFromHeader, getSize, getUsedMem, incElems, init, initFromFile, main, printBinaryKey, putBinary, removeBinary, removeEntry, resizeStore, setEntry, writeEntryHeader
-
Field Details
-
tmpVal
-
coder
-
buffer
protected byte[] buffer
-
-
Constructor Details
-
Method Details
-
encodeValue
- Specified by:
encodeValuein classFSTCodedOffheapMap<K,V>
-
getEntryLengthForContentLength
protected int getEntryLengthForContentLength(long lengthOfEntry) default is to let 100% room for later entry growth. Avoid fragmentation as hell.- Overrides:
getEntryLengthForContentLengthin classFSTBinaryOffheapMap- Parameters:
lengthOfEntry-- Returns:
-
getCoder
-
decodeValue
- Specified by:
decodeValuein classFSTCodedOffheapMap<K,V>
-