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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcachedDataLength()The length this entity occupies in the cache.longclearCache()voidcopyCachedData(MemoryRangeReader entityDataCollector)longdataLength()longexportTo(one.microstream.afs.types.AWritableFile file)booleanhasReferences()booleaniterateReferenceIds(one.microstream.persistence.types.PersistenceObjectIdAcceptor referenceIdIterator)longlastTouched()The approximate system time that this particular entity has been last touched.longobjectId()StorageLiveDataFilestorageFile()longstoragePosition()StringtoString()longtypeId()
-
-
-
Method Detail
-
dataLength
public final long dataLength()
- Specified by:
dataLengthin interfaceStorageEntity- Returns:
- The entity's data length, meaning the pure content length without any header or meta data.
-
typeId
public long typeId()
- Specified by:
typeIdin interfaceStorageEntity- Returns:
- The entity's type id.
-
storagePosition
public final long storagePosition()
- Specified by:
storagePositionin interfaceStorageEntity
-
cachedDataLength
public final long cachedDataLength()
Description copied from interface:StorageEntityThe length this entity occupies in the cache. This might 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:
cachedDataLengthin interfaceStorageEntity- Returns:
- The length this entity occupies in the cache.
-
hasReferences
public final boolean hasReferences()
- Specified by:
hasReferencesin 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:
objectIdin interfaceStorageEntity- Returns:
- The entity's biunique identifying id number.
-
lastTouched
public final long lastTouched()
Description copied from interface:StorageEntityThe approximate system time that this particular entity has been last touched. The returned value is compatible to the value returned bySystem.currentTimeMillis().- Specified by:
lastTouchedin interfaceStorageEntity- Returns:
- approximate system time that this particular entity has been last touched
-
storageFile
public final StorageLiveDataFile storageFile()
- Specified by:
storageFilein interfaceStorageEntity
-
iterateReferenceIds
public final boolean iterateReferenceIds(one.microstream.persistence.types.PersistenceObjectIdAcceptor referenceIdIterator)
- Specified by:
iterateReferenceIdsin interfaceStorageEntity
-
exportTo
public final long exportTo(one.microstream.afs.types.AWritableFile file)
- Specified by:
exportToin interfaceStorageEntity
-
copyCachedData
public final void copyCachedData(MemoryRangeReader entityDataCollector)
- Specified by:
copyCachedDatain interfaceStorageEntity
-
clearCache
public final long clearCache()
- Specified by:
clearCachein interfaceStorageEntity
-
-