Package one.microstream.storage.types
Class StorageLiveDataFile.Default
java.lang.Object
one.microstream.storage.types.StorageFile.Abstract
one.microstream.storage.types.StorageLiveFile.Abstract<StorageLiveDataFile>
one.microstream.storage.types.StorageLiveDataFile.Default
- All Implemented Interfaces:
StorageBackupableFile
,StorageChannelFile
,StorageClosableFile
,StorageCreatableFile
,StorageDataFile
,StorageFile
,StorageHashChannelPart
,StorageLiveChannelFile<StorageLiveDataFile>
,StorageLiveDataFile
,StorageLiveFile<StorageLiveDataFile>
,StorageTruncatableChannelFile
- Enclosing interface:
- StorageLiveDataFile
public static class StorageLiveDataFile.Default extends StorageLiveFile.Abstract<StorageLiveDataFile> implements StorageLiveDataFile
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageChannelFile
StorageChannelFile.Abstract
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageDataFile
StorageDataFile.Abstract, StorageDataFile.Creator<F extends StorageDataFile>
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageFile
StorageFile.Abstract
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageLiveDataFile
StorageLiveDataFile.Default
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageLiveFile
StorageLiveFile.Abstract<S extends StorageLiveFile<S>>
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
Modifier and Type Method Description void
appendEntry(StorageEntity.Default entry)
int
channelIndex()
double
dataFillRatio()
long
dataLength()
boolean
executeIfUnsuedData(Consumer<? super StorageLiveDataFile.Default> action)
boolean
hasSingleEntity()
Querying method to check if a storage file consists of only one singular live entity.boolean
isHeadFile()
void
loadEntityData(StorageEntity.Default entity, long length, long cacheChange)
long
number()
void
prependEntry(StorageEntity.Default entry)
void
remove(StorageEntity.Default entity)
String
toString()
long
totalLength()
boolean
unregisterUsageClosingData(StorageFileUser fileUser, Consumer<? super StorageLiveDataFile.Default> closingAction)
Methods inherited from class one.microstream.storage.types.StorageLiveFile.Abstract
clearUsages, executeIfUnsued, hasUsers, registerUsage, unregisterUsage, unregisterUsageClosing
Methods inherited from class one.microstream.storage.types.StorageFile.Abstract
close, copyFrom, copyFrom, copyFrom, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, delete, exists, file, isOpen, moveTo, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, size, truncate, writeBytes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface one.microstream.storage.types.StorageFile
copyFrom, copyFrom, copyFrom, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, delete, exists, file, identifier, moveTo, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, size, writeBytes
Methods inherited from interface one.microstream.storage.types.StorageLiveFile
clearUsages, executeIfUnsued, hasUsers, registerUsage, unregisterUsage, unregisterUsageClosing
Methods inherited from interface one.microstream.storage.types.StorageTruncatableChannelFile
truncate
-
Constructor Details
-
Default
public Default()
-
-
Method Details
-
channelIndex
public final int channelIndex()- Specified by:
channelIndex
in interfaceStorageChannelFile
- Specified by:
channelIndex
in interfaceStorageDataFile
- Specified by:
channelIndex
in interfaceStorageHashChannelPart
-
number
public final long number()- Specified by:
number
in interfaceStorageDataFile
-
dataLength
public long dataLength()- Specified by:
dataLength
in interfaceStorageLiveDataFile
-
totalLength
public long totalLength()- Specified by:
totalLength
in interfaceStorageLiveDataFile
-
executeIfUnsuedData
-
unregisterUsageClosingData
public final boolean unregisterUsageClosingData(StorageFileUser fileUser, Consumer<? super StorageLiveDataFile.Default> closingAction) -
dataFillRatio
public final double dataFillRatio()- Specified by:
dataFillRatio
in interfaceStorageLiveDataFile
-
hasSingleEntity
public final boolean hasSingleEntity()Description copied from interface:StorageLiveDataFile
Querying method to check if a storage file consists of only one singular live entity. This is necessary to avoid dissolving files that are oversized because of one single oversized entity.- Specified by:
hasSingleEntity
in interfaceStorageLiveDataFile
- Returns:
- true if the file containts exactely one live entity.
-
remove
-
prependEntry
-
appendEntry
-
loadEntityData
-
isHeadFile
public boolean isHeadFile()- Specified by:
isHeadFile
in interfaceStorageLiveDataFile
-
toString
- Overrides:
toString
in classStorageFile.Abstract
-