Class OffHeapRecordStorage
java.lang.Object
org.nustaq.reallive.server.storage.OffHeapRecordStorage
- All Implemented Interfaces:
RealLiveStreamActor,RecordStorage,SafeRealLiveStreamActor,RecordPersistance
Created by moelrue on 05.08.2015.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOffHeapRecordStorage(int maxKeyLen, int sizeMB, int estimatedNumRecords) OffHeapRecordStorage(String file, int maxKeyLen, int sizeMB, int estimatedNumRecords) -
Method Summary
Modifier and TypeMethodDescriptiondoes not update lastmodified timestampvoid_saveMapping(ClusterTableRecordMapping mapping) createMemMap(int sizeMB, int estimatedNumRecords, int keyLen) createPersistentMap(String tableFile, int sizeMB, int estimatedNumRecords, int keyLen) <T> voidforEachWithSpore(org.nustaq.kontraktor.Spore<Record, T> spore) getStats()protected voidinit(String tableFile, int sizeMB, int estimatedNumRecords, int keyLen, boolean persist, Class... toReg) voidresizeIfLoadFactorLarger(double loadFactor, long maxGrow) longsize()stream()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nustaq.reallive.api.RealLiveStreamActor
forEach, forEach, listByQuery, map, query
-
Constructor Details
-
OffHeapRecordStorage
protected OffHeapRecordStorage() -
OffHeapRecordStorage
public OffHeapRecordStorage(int maxKeyLen, int sizeMB, int estimatedNumRecords) -
OffHeapRecordStorage
-
-
Method Details
-
init
-
createMemMap
-
createPersistentMap
protected org.nustaq.offheap.FSTSerializedOffheapMap<String,Record> createPersistentMap(String tableFile, int sizeMB, int estimatedNumRecords, int keyLen) throws Exception - Throws:
Exception
-
getStats
- Specified by:
getStatsin interfaceRecordPersistance- Specified by:
getStatsin interfaceRecordStorage
-
put
- Specified by:
putin interfaceRecordPersistance- Specified by:
putin interfaceRecordStorage
-
_rawPut
Description copied from interface:RecordPersistancedoes not update lastmodified timestamp- Specified by:
_rawPutin interfaceRecordPersistance- Returns:
-
get
- Specified by:
getin interfaceRecordStorage
-
remove
- Specified by:
removein interfaceRecordPersistance- Specified by:
removein interfaceRecordStorage
-
size
public long size()- Specified by:
sizein interfaceRecordStorage
-
stream
- Specified by:
streamin interfaceRecordStorage
-
resizeIfLoadFactorLarger
public void resizeIfLoadFactorLarger(double loadFactor, long maxGrow) - Specified by:
resizeIfLoadFactorLargerin interfaceRecordPersistance- Specified by:
resizeIfLoadFactorLargerin interfaceRecordStorage
-
getRemoveLog
- Specified by:
getRemoveLogin interfaceRecordPersistance
-
forEachWithSpore
- Specified by:
forEachWithSporein interfaceRealLiveStreamActor- Specified by:
forEachWithSporein interfaceRecordPersistance
-
_saveMapping
- Specified by:
_saveMappingin interfaceRecordPersistance
-
_loadMapping
- Specified by:
_loadMappingin interfaceRecordPersistance
-