Package one.microstream.storage.types
Class StorageEntityCache.Default
- java.lang.Object
-
- one.microstream.storage.types.StorageEntityCache.Default
-
- All Implemented Interfaces:
Unpersistable,StorageEntityCache<StorageEntity.Default>,StorageHashChannelPart
- Enclosing interface:
- StorageEntityCache<I extends StorageEntityCacheItem<I>>
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(int channelIndex, int channelCount, StorageEntityCacheEvaluator cacheEvaluator, StorageTypeDictionary typeDictionary, StorageEntityMarkMonitor markMonitor, StorageGCZombieOidHandler zombieOidHandler, StorageRootOidSelector rootOidSelector, long rootTypeId, StorageobjectIdMarkQueue oidMarkQueue, StorageEventLogger eventLogger, int markingBufferLength, long markingWaitTimeMs)
-
Method Summary
Modifier and Type Method Description longcacheSize()intchannelIndex()longclearCache()voidcopyRoots(ChunksBuffer dataCollector)longentityCount()StorageEntity.DefaultgetEntry(long objectId)booleanincrementalGarbageCollection(long timeBudgetBound, StorageChannel channel)Returnstrueif there are no more oids to mark andfalseif time ran out.booleanincrementalLiveCheck(long timeBudgetBound)booleanissuedCacheCheck(long nanoTimeBudget, 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, StorageDataFile.Default dataFile)StorageTypeDictionarytypeDictionary()
-
-
-
Constructor Detail
-
Default
public Default(int channelIndex, int channelCount, StorageEntityCacheEvaluator cacheEvaluator, StorageTypeDictionary typeDictionary, StorageEntityMarkMonitor markMonitor, StorageGCZombieOidHandler zombieOidHandler, StorageRootOidSelector rootOidSelector, long rootTypeId, StorageobjectIdMarkQueue oidMarkQueue, StorageEventLogger eventLogger, int markingBufferLength, long markingWaitTimeMs)
-
-
Method Detail
-
getEntry
public final StorageEntity.Default getEntry(long objectId)
-
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
public final StorageTypeDictionary typeDictionary()
- Specified by:
typeDictionaryin interfaceStorageEntityCache<StorageEntity.Default>
-
postStorePutEntities
public void postStorePutEntities(ByteBuffer[] chunks, long[] chunksStoragePositions, StorageDataFile.Default dataFile) throws InterruptedException
- Throws:
InterruptedException
-
lookupType
public final StorageEntityType.Default lookupType(long typeId)
- Specified by:
lookupTypein interfaceStorageEntityCache<StorageEntity.Default>
-
copyRoots
public void copyRoots(ChunksBuffer dataCollector)
- Specified by:
copyRootsin interfaceStorageEntityCache<StorageEntity.Default>
-
incrementalLiveCheck
public final boolean incrementalLiveCheck(long timeBudgetBound)
- Specified by:
incrementalLiveCheckin interfaceStorageEntityCache<StorageEntity.Default>
-
issuedCacheCheck
public boolean issuedCacheCheck(long nanoTimeBudget, StorageEntityCacheEvaluator entityEvaluator)- Specified by:
issuedCacheCheckin interfaceStorageEntityCache<StorageEntity.Default>
-
issuedGarbageCollection
public final boolean issuedGarbageCollection(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:
issuedGarbageCollectionin interfaceStorageEntityCache<StorageEntity.Default>
-
incrementalGarbageCollection
public final boolean incrementalGarbageCollection(long timeBudgetBound, 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>
-
-