Package one.microstream.storage.types
Class StorageEntity.Default
java.lang.Object
one.microstream.storage.types.StorageEntity.Default
- All Implemented Interfaces:
StorageEntity
- Enclosing interface:
- StorageEntity
public static final class StorageEntity.Default extends Object implements StorageEntity
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageEntity
StorageEntity.Default, StorageEntity.MaxObjectId, StorageEntity.MinObjectId
-
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()
long
exportTo(AWritableFile file)
boolean
hasReferences()
boolean
iterateReferenceIds(PersistenceObjectIdAcceptor referenceIdIterator)
long
lastTouched()
The approximate system time that this particular entity has been last touched.long
objectId()
StorageLiveDataFile
storageFile()
long
storagePosition()
String
toString()
long
typeId()
-
Method Details
-
dataLength
public final long dataLength()- Specified by:
dataLength
in interfaceStorageEntity
- Returns:
- The entity's data length, meaning the pure content length without any header or meta data.
-
typeId
public long typeId()- Specified by:
typeId
in interfaceStorageEntity
- Returns:
- The entity's type id.
-
storagePosition
public final long storagePosition()- Specified by:
storagePosition
in interfaceStorageEntity
-
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
- Returns:
- The length this entity occupies in the cache.
-
hasReferences
public final boolean hasReferences()- Specified by:
hasReferences
in interfaceStorageEntity
- Returns:
- The information if this entity's type has reference fields (regardless of a particular entity's actual data).
-
objectId
public final long objectId()- Specified by:
objectId
in interfaceStorageEntity
- Returns:
- The entity's biunique identifying id number.
-
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
- Returns:
- approximate system time that this particular entity has been last touched
-
storageFile
- Specified by:
storageFile
in interfaceStorageEntity
-
iterateReferenceIds
- Specified by:
iterateReferenceIds
in interfaceStorageEntity
-
exportTo
- Specified by:
exportTo
in interfaceStorageEntity
-
copyCachedData
- Specified by:
copyCachedData
in interfaceStorageEntity
-
clearCache
public final long clearCache()- Specified by:
clearCache
in interfaceStorageEntity
-
toString
-