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 Modifier Constructor Description protectedDefault(StorageFileManager.Default parent, one.microstream.afs.types.AFile file, int channelIndex, long number)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendEntry(StorageEntity.Default entry)intchannelIndex()doubledataFillRatio()longdataLength()booleanexecuteIfUnsuedData(Consumer<? super StorageLiveDataFile.Default> action)booleanhasSingleEntity()Querying method to check if a storage file consists of only one singular live entity.protected booleaninternalOpenWriting()booleanisHeadFile()voidloadEntityData(StorageEntity.Default entity, long length, long cacheChange)longnumber()voidprependEntry(StorageEntity.Default entry)voidremove(StorageEntity.Default entity)StringtoString()longtotalLength()booleanunregisterUsageClosingData(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, ensureReadable, ensureWritable, exists, file, internalOpenReading, 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.StorageClosableFile
close, isOpen
-
Methods inherited from interface one.microstream.storage.types.StorageCreatableFile
ensure
-
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.StorageLiveDataFile
ensureBackupFile
-
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 Detail
-
Default
protected Default(StorageFileManager.Default parent, one.microstream.afs.types.AFile file, int channelIndex, long number)
-
-
Method Detail
-
channelIndex
public final int channelIndex()
- Specified by:
channelIndexin interfaceStorageChannelFile- Specified by:
channelIndexin interfaceStorageDataFile- Specified by:
channelIndexin interfaceStorageHashChannelPart
-
number
public final long number()
- Specified by:
numberin interfaceStorageDataFile
-
dataLength
public long dataLength()
- Specified by:
dataLengthin interfaceStorageLiveDataFile
-
totalLength
public long totalLength()
- Specified by:
totalLengthin interfaceStorageLiveDataFile
-
executeIfUnsuedData
public boolean executeIfUnsuedData(Consumer<? super StorageLiveDataFile.Default> action)
-
unregisterUsageClosingData
public final boolean unregisterUsageClosingData(StorageFileUser fileUser, Consumer<? super StorageLiveDataFile.Default> closingAction)
-
internalOpenWriting
protected boolean internalOpenWriting()
- Overrides:
internalOpenWritingin classStorageFile.Abstract
-
dataFillRatio
public final double dataFillRatio()
- Specified by:
dataFillRatioin interfaceStorageLiveDataFile
-
hasSingleEntity
public final boolean hasSingleEntity()
Description copied from interface:StorageLiveDataFileQuerying 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:
hasSingleEntityin interfaceStorageLiveDataFile- Returns:
- true if the file contains exactly one live entity.
-
remove
public final void remove(StorageEntity.Default entity)
-
prependEntry
public final void prependEntry(StorageEntity.Default entry)
-
appendEntry
public final void appendEntry(StorageEntity.Default entry)
-
loadEntityData
public final void loadEntityData(StorageEntity.Default entity, long length, long cacheChange)
-
isHeadFile
public boolean isHeadFile()
- Specified by:
isHeadFilein interfaceStorageLiveDataFile
-
toString
public final String toString()
- Overrides:
toStringin classStorageFile.Abstract
-
-