Package com.illumon.iris.db.v2.locations
Class CheckpointDrivenFileDataBufferStore
java.lang.Object
com.illumon.iris.db.v2.locations.FileDataBufferStore
com.illumon.iris.db.v2.locations.CheckpointDrivenFileDataBufferStore
- All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable,CheckpointRecord.DataFileSizeRecord,CheckpointRecord.MutableFileSizeRecord,CheckpointRecord.SourceFileSizeRecord
public class CheckpointDrivenFileDataBufferStore
extends FileDataBufferStore
implements CheckpointRecord.MutableFileSizeRecord
A FileDataBufferStore that gets file sizes from a checkpoint record, and never directly from disk.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.db.v2.locations.FileDataBufferStore
FileDataBufferStore.StoredBufferMessage -
Field Summary
Fields inherited from class com.illumon.iris.db.v2.locations.FileDataBufferStore
NULL_PENDING_POSITION, size -
Constructor Summary
ConstructorsConstructorDescriptionCheckpointDrivenFileDataBufferStore(FileAccessor fileAccessor, ByteOrder byteOrder, long initialSize, String fileName) Construct a CheckpointDrivenFileDataBufferStore. -
Method Summary
Modifier and TypeMethodDescriptiondefault com.fishlib.base.log.LogOutputappend(com.fishlib.base.log.LogOutput logOutput) voidEnsure the underlying file exists.voidensureSize(long requiredSize) Make sure size is large enough to accommodate a request.protected voidextend(long newSize) Inform this store of an observed change in the file data size.getName()longgetSize()voidsetSize(long newSize) Methods inherited from class com.illumon.iris.db.v2.locations.FileDataBufferStore
acceptBufferByIndex, disableReleaseTracking, enableReleaseTracking, force, getMessageViewByOffset, getUpdatedSize, promotePending, provideBufferReferenceByIndex, releaseCachedResources, revertPending, size, toString
-
Constructor Details
-
CheckpointDrivenFileDataBufferStore
public CheckpointDrivenFileDataBufferStore(@NotNull FileAccessor fileAccessor, @NotNull ByteOrder byteOrder, long initialSize, @NotNull String fileName) Construct a CheckpointDrivenFileDataBufferStore.- Parameters:
fileAccessor- An accessor for the file (or file region) that we're presenting a buffered view ofbyteOrder- The byte order that should be used for all buffers in this storeinitialSize- Initially known visible size of the underlying file (or file region)fileName- name of the file (for DataFileSizeRecord lookup in the checkpointRecord)
-
-
Method Details
-
getName
-
getSize
public long getSize() -
setSize
public void setSize(long newSize) - Specified by:
setSizein interfaceCheckpointRecord.MutableFileSizeRecord
-
extend
protected void extend(long newSize) Description copied from class:FileDataBufferStoreInform this store of an observed change in the file data size.- Overrides:
extendin classFileDataBufferStore- Parameters:
newSize- The new size
-
ensureSize
public void ensureSize(long requiredSize) Description copied from class:FileDataBufferStoreMake sure size is large enough to accommodate a request. Call before proceeding with any request.- Overrides:
ensureSizein classFileDataBufferStore- Parameters:
requiredSize- The size required by the caller in order to make progress
-
ensureFileExists
public void ensureFileExists()Description copied from class:FileDataBufferStoreEnsure the underlying file exists.- Overrides:
ensureFileExistsin classFileDataBufferStore
-
append
default com.fishlib.base.log.LogOutput append(@NotNull com.fishlib.base.log.LogOutput logOutput) - Specified by:
appendin interfacecom.fishlib.base.log.LogOutputAppendable
-