Package one.microstream.storage.types
Class StorageEntity.Default
- java.lang.Object
-
- one.microstream.storage.types.StorageEntity.Default
-
- All Implemented Interfaces:
StorageEntity
,StorageEntityCacheItem<StorageEntity.Default>
- Enclosing interface:
- StorageEntity
public static final class StorageEntity.Default extends Object implements StorageEntityCacheItem<StorageEntity.Default>, StorageEntity
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageEntity
StorageEntity.Default, StorageEntity.MaxObjectId, StorageEntity.MinObjectId
-
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
Modifier and Type Method Description long
cachedDataLength()
The length this entity occupies in the cache.long
clearCache()
void
copyCachedData(MemoryRangeReader entityDataCollector)
long
dataLength()
the entity's data length, meaning the pure content length without any header or meta data.long
exportTo(StorageLockedFile file)
boolean
hasReferences()
The information if this entity's type has reference fields (regardless of a particular entity's actual data).boolean
iterateReferenceIds(PersistenceObjectIdAcceptor referenceIdIterator)
long
lastTouched()
The approximate system time that this particular entity has been last touched.long
objectId()
The entity's biunique identifying id number.StorageDataFile<StorageEntity.Default>
storageFile()
long
storagePosition()
String
toString()
long
typeId()
The entity's type id.
-
-
-
Method Detail
-
dataLength
public final long dataLength()
Description copied from interface:StorageEntity
the entity's data length, meaning the pure content length without any header or meta data.- Specified by:
dataLength
in interfaceStorageEntity
- Specified by:
dataLength
in interfaceStorageEntityCacheItem<StorageEntity.Default>
-
typeId
public long typeId()
Description copied from interface:StorageEntity
The entity's type id.- Specified by:
typeId
in interfaceStorageEntity
-
storagePosition
public final long storagePosition()
- Specified by:
storagePosition
in interfaceStorageEntityCacheItem<StorageEntity.Default>
-
cachedDataLength
public final long cachedDataLength()
Description copied from interface:StorageEntity
The length this entity occupies in the cache. This might be vary, even for fixed length typed, from the values returned byStorageEntity.dataLength()
as only parts of an entity (e.g. only references) might be loaded into cache and because the cache might hold the header/meta data of an entity as well.- Specified by:
cachedDataLength
in interfaceStorageEntity
-
hasReferences
public final boolean hasReferences()
Description copied from interface:StorageEntity
The information if this entity's type has reference fields (regardless of a particular entity's actual data).- Specified by:
hasReferences
in interfaceStorageEntity
-
objectId
public final long objectId()
Description copied from interface:StorageEntity
The entity's biunique identifying id number.- Specified by:
objectId
in interfaceStorageEntity
- Specified by:
objectId
in interfaceStorageEntityCacheItem<StorageEntity.Default>
-
lastTouched
public final long lastTouched()
Description copied from interface:StorageEntity
The approximate system time that this particular entity has been last touched. The returned value is compatible to the value returned bySystem.currentTimeMillis()
.- Specified by:
lastTouched
in interfaceStorageEntity
-
storageFile
public final StorageDataFile<StorageEntity.Default> storageFile()
- Specified by:
storageFile
in interfaceStorageEntityCacheItem<StorageEntity.Default>
-
iterateReferenceIds
public final boolean iterateReferenceIds(PersistenceObjectIdAcceptor referenceIdIterator)
- Specified by:
iterateReferenceIds
in interfaceStorageEntityCacheItem<StorageEntity.Default>
-
exportTo
public final long exportTo(StorageLockedFile file)
- Specified by:
exportTo
in interfaceStorageEntityCacheItem<StorageEntity.Default>
-
copyCachedData
public final void copyCachedData(MemoryRangeReader entityDataCollector)
- Specified by:
copyCachedData
in interfaceStorageEntityCacheItem<StorageEntity.Default>
-
clearCache
public final long clearCache()
- Specified by:
clearCache
in interfaceStorageEntityCacheItem<StorageEntity.Default>
-
-