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
-
Method Summary
Modifier and Type Method Description long
cacheSize()
int
channelIndex()
long
clearCache()
void
copyRoots(ChunksBuffer dataCollector)
long
entityCount()
StorageEntity.Default
getEntry(long objectId)
boolean
incrementalEntityCacheCheck(long nanoTimeBudgetBound)
boolean
incrementalGarbageCollection(long nanoTimeBudgetBound, StorageChannel channel)
Returnstrue
if there are no more oids to mark andfalse
if time ran out.boolean
issuedEntityCacheCheck(long nanoTimeBudgetBound, StorageEntityCacheEvaluator entityEvaluator)
boolean
issuedGarbageCollection(long nanoTimeBudgetBound, StorageChannel channel)
Returnstrue
if there are no more oids to mark andfalse
if time ran out.StorageEntityType.Default
lookupType(long typeId)
void
postStorePutEntities(ByteBuffer[] chunks, long[] chunksStoragePositions, StorageLiveDataFile.Default dataFile)
void
reset()
Closes all resources (files, locks, etc.).static void
setGarbageCollectionEnabled(boolean enabled)
StorageTypeDictionary
typeDictionary()
-
Method Details
-
setGarbageCollectionEnabled
public static void setGarbageCollectionEnabled(boolean enabled) -
reset
public final void reset()Description copied from interface:StorageChannelResetablePart
Closes 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:
reset
in interfaceStorageChannelResetablePart
- Specified by:
reset
in interfaceStorageEntityCache<StorageEntity.Default>
-
getEntry
-
entityCount
public final long entityCount() -
channelIndex
public int channelIndex()- Specified by:
channelIndex
in interfaceStorageHashChannelPart
-
cacheSize
public final long cacheSize()- Specified by:
cacheSize
in interfaceStorageEntityCache<StorageEntity.Default>
-
clearCache
public final long clearCache()- Specified by:
clearCache
in interfaceStorageEntityCache<StorageEntity.Default>
-
typeDictionary
- Specified by:
typeDictionary
in interfaceStorageEntityCache<StorageEntity.Default>
-
postStorePutEntities
public void postStorePutEntities(ByteBuffer[] chunks, long[] chunksStoragePositions, StorageLiveDataFile.Default dataFile) throws InterruptedException- Throws:
InterruptedException
-
lookupType
- Specified by:
lookupType
in interfaceStorageEntityCache<StorageEntity.Default>
-
copyRoots
- Specified by:
copyRoots
in interfaceStorageEntityCache<StorageEntity.Default>
-
incrementalEntityCacheCheck
public final boolean incrementalEntityCacheCheck(long nanoTimeBudgetBound)- Specified by:
incrementalEntityCacheCheck
in interfaceStorageEntityCache<StorageEntity.Default>
-
issuedEntityCacheCheck
public boolean issuedEntityCacheCheck(long nanoTimeBudgetBound, StorageEntityCacheEvaluator entityEvaluator)- Specified by:
issuedEntityCacheCheck
in interfaceStorageEntityCache<StorageEntity.Default>
-
issuedGarbageCollection
Returnstrue
if there are no more oids to mark andfalse
if time ran out. (Meaning the returned boolean effectively means "Was there enough time?")- Specified by:
issuedGarbageCollection
in interfaceStorageEntityCache<StorageEntity.Default>
-
incrementalGarbageCollection
public final boolean incrementalGarbageCollection(long nanoTimeBudgetBound, StorageChannel channel)Returnstrue
if there are no more oids to mark andfalse
if time ran out. (Meaning the returned boolean effectively means "Was there enough time?")- Specified by:
incrementalGarbageCollection
in interfaceStorageEntityCache<StorageEntity.Default>
-