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, int markingBufferLength, long markingWaitTimeMs)
-
Method Summary
Modifier and Type Method Description long
cacheSize()
int
channelIndex()
void
copyRoots(ChunksBuffer dataCollector)
long
entityCount()
StorageEntity.Default
getEntry(long objectId)
boolean
incrementalGarbageCollection(long timeBudgetBound, StorageChannel channel)
Returnstrue
if there are no more oids to mark andfalse
if time ran out.boolean
incrementalLiveCheck(long timeBudgetBound)
boolean
issuedCacheCheck(long nanoTimeBudget, 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, StorageDataFile.Default dataFile)
StorageTypeDictionary
typeDictionary()
-
-
-
Constructor Detail
-
Default
public Default(int channelIndex, int channelCount, StorageEntityCacheEvaluator cacheEvaluator, StorageTypeDictionary typeDictionary, StorageEntityMarkMonitor markMonitor, StorageGCZombieOidHandler zombieOidHandler, StorageRootOidSelector rootOidSelector, long rootTypeId, StorageobjectIdMarkQueue oidMarkQueue, 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:
channelIndex
in interfaceStorageHashChannelPart
-
cacheSize
public final long cacheSize()
- Specified by:
cacheSize
in interfaceStorageEntityCache<StorageEntity.Default>
-
typeDictionary
public final StorageTypeDictionary typeDictionary()
- Specified by:
typeDictionary
in 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:
lookupType
in interfaceStorageEntityCache<StorageEntity.Default>
-
copyRoots
public void copyRoots(ChunksBuffer dataCollector)
- Specified by:
copyRoots
in interfaceStorageEntityCache<StorageEntity.Default>
-
incrementalLiveCheck
public final boolean incrementalLiveCheck(long timeBudgetBound)
- Specified by:
incrementalLiveCheck
in interfaceStorageEntityCache<StorageEntity.Default>
-
issuedCacheCheck
public boolean issuedCacheCheck(long nanoTimeBudget, StorageEntityCacheEvaluator entityEvaluator)
- Specified by:
issuedCacheCheck
in interfaceStorageEntityCache<StorageEntity.Default>
-
issuedGarbageCollection
public final boolean issuedGarbageCollection(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:
issuedGarbageCollection
in interfaceStorageEntityCache<StorageEntity.Default>
-
incrementalGarbageCollection
public final boolean incrementalGarbageCollection(long timeBudgetBound, 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>
-
-