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.AbstractNested 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.AbstractNested classes/interfaces inherited from interface one.microstream.storage.types.StorageLiveDataFile
StorageLiveDataFile.DefaultNested 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 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.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, unregisterUsageClosingMethods 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, writeBytesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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, writeBytesMethods inherited from interface one.microstream.storage.types.StorageLiveFile
clearUsages, executeIfUnsued, hasUsers, registerUsage, unregisterUsage, unregisterUsageClosingMethods inherited from interface one.microstream.storage.types.StorageTruncatableChannelFile
truncate
-
Constructor Details
-
Default
public Default()
-
-
Method Details
-
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
-
unregisterUsageClosingData
public final boolean unregisterUsageClosingData(StorageFileUser fileUser, Consumer<? super StorageLiveDataFile.Default> closingAction) -
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 containts exactely one live entity.
-
remove
-
prependEntry
-
appendEntry
-
loadEntityData
-
isHeadFile
public boolean isHeadFile()- Specified by:
isHeadFilein interfaceStorageLiveDataFile
-
toString
- Overrides:
toStringin classStorageFile.Abstract
-