Package one.microstream.storage.types
Class StorageEntityCache.Default
- java.lang.Object
-
- one.microstream.storage.types.StorageEntityCache.Default
-
- All Implemented Interfaces:
one.microstream.persistence.types.Unpersistable,StorageChannelResetablePart,StorageEntityCache<StorageEntity.Default>,StorageHashChannelPart
- Enclosing interface:
- StorageEntityCache<E extends StorageEntity>
public static final class StorageEntityCache.Default extends Object implements StorageEntityCache<StorageEntity.Default>, one.microstream.persistence.types.Unpersistable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageEntityCache
StorageEntityCache.Default
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longcacheSize()intchannelIndex()longclearCache()voidcopyRoots(ChunksBuffer dataCollector)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.).static voidsetGarbageCollectionEnabled(boolean enabled)StorageTypeDictionarytypeDictionary()
-
-
-
Method Detail
-
setGarbageCollectionEnabled
public static void setGarbageCollectionEnabled(boolean 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
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, StorageLiveDataFile.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>
-
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
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 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>
-
-