Package one.microstream.storage.types
Class StorageEntityCache.Default
java.lang.Object
one.microstream.storage.types.StorageEntityCache.Default
- All Implemented Interfaces:
Unpersistable,StorageChannelResetablePart,StorageEntityCache<StorageEntity.Default>,StorageHashChannelPart
- Enclosing interface:
- StorageEntityCache<E extends StorageEntity>
public static final class StorageEntityCache.Default extends Object implements StorageEntityCache<StorageEntity.Default>, Unpersistable
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageEntityCache
StorageEntityCache.Default -
Constructor Summary
Constructors Constructor Description Default() -
Method Summary
Modifier and Type Method Description longcacheSize()intchannelIndex()longclearCache()voidcopyRoots(ChunksBuffer dataCollector)static voidDEBUG_setGarbageCollectionEnabled(boolean enabled)Deprecated.longentityCount()StorageEntity.DefaultgetEntry(long objectId)booleanincrementalEntityCacheCheck(long nanoTimeBudgetBound)booleanincrementalGarbageCollection(long nanoTimeBudgetBound, StorageChannel channel)Returnstrueif there are no more oids to mark andfalseif time ran out.booleanissuedEntityCacheCheck(long nanoTimeBudgetBound, StorageEntityCacheEvaluator entityEvaluator)booleanissuedGarbageCollection(long nanoTimeBudgetBound, StorageChannel channel)Returnstrueif there are no more oids to mark andfalseif time ran out.StorageEntityType.DefaultlookupType(long typeId)voidpostStorePutEntities(ByteBuffer[] chunks, long[] chunksStoragePositions, StorageLiveDataFile.Default dataFile)voidreset()Closes all resources (files, locks, etc.).StorageTypeDictionarytypeDictionary()
-
Constructor Details
-
Default
public Default()
-
-
Method Details
-
DEBUG_setGarbageCollectionEnabled
Deprecated./!\ Storage-level garbage collection is an unfinished feature with a still tiny race condition problem that can cause the database to be ruined occasionally.Enable at your own risk!
Also note that this method is a temporary experimental function for debugging purposes and can disappear at any release.
Do not use this is production mode.- Parameters:
enabled-
-
reset
public final void reset()Description copied from interface:StorageChannelResetablePartCloses all resources (files, locks, etc.). Clears all variable length items (cache, registry, etc.). Resets internal state to initial values. For itself and all its parts (entity cache, file manager, etc.). Basically a "back to just being born" action.- Specified by:
resetin interfaceStorageChannelResetablePart- Specified by:
resetin interfaceStorageEntityCache<StorageEntity.Default>
-
getEntry
-
entityCount
public final long entityCount() -
channelIndex
public int channelIndex()- Specified by:
channelIndexin interfaceStorageHashChannelPart
-
cacheSize
public final long cacheSize()- Specified by:
cacheSizein interfaceStorageEntityCache<StorageEntity.Default>
-
clearCache
public final long clearCache()- Specified by:
clearCachein interfaceStorageEntityCache<StorageEntity.Default>
-
typeDictionary
- Specified by:
typeDictionaryin interfaceStorageEntityCache<StorageEntity.Default>
-
postStorePutEntities
public void postStorePutEntities(ByteBuffer[] chunks, long[] chunksStoragePositions, StorageLiveDataFile.Default dataFile) throws InterruptedException- Throws:
InterruptedException
-
lookupType
- Specified by:
lookupTypein interfaceStorageEntityCache<StorageEntity.Default>
-
copyRoots
- Specified by:
copyRootsin interfaceStorageEntityCache<StorageEntity.Default>
-
incrementalEntityCacheCheck
public final boolean incrementalEntityCacheCheck(long nanoTimeBudgetBound)- Specified by:
incrementalEntityCacheCheckin interfaceStorageEntityCache<StorageEntity.Default>
-
issuedEntityCacheCheck
public boolean issuedEntityCacheCheck(long nanoTimeBudgetBound, StorageEntityCacheEvaluator entityEvaluator)- Specified by:
issuedEntityCacheCheckin interfaceStorageEntityCache<StorageEntity.Default>
-
issuedGarbageCollection
Returnstrueif there are no more oids to mark andfalseif time ran out. (Meaning the returned boolean effectively means "Was there enough time?")- Specified by:
issuedGarbageCollectionin interfaceStorageEntityCache<StorageEntity.Default>
-
incrementalGarbageCollection
public final boolean incrementalGarbageCollection(long nanoTimeBudgetBound, StorageChannel channel)Returnstrueif there are no more oids to mark andfalseif time ran out. (Meaning the returned boolean effectively means "Was there enough time?")- Specified by:
incrementalGarbageCollectionin interfaceStorageEntityCache<StorageEntity.Default>
-