Class ColumnFileState
java.lang.Object
com.illumon.iris.db.v2.locations.local.ColumnFileState
A class for tracking the state of individual column files within a Deephaven format table.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic io.deephaven.hash.KeyedObjectKey<ColumnFileTypeDetails,
ColumnFileState> -
Method Summary
Modifier and TypeMethodDescriptionprotected FileAccessor
getByteOrder
(CheckpointRecord readerCheckpointRecord) long
protected FileAccessor
abstract FileDataBufferStore
getDataBufferStore
(CheckpointRecord checkpointRecord) protected int
getFile()
protected abstract FileAccessor
long
static ColumnFileState
readOnly
(ColumnFileTypeDetails typeDetails, File directory, String name, boolean hasHeader, Function<ColumnFileType, ColumnFileState> stateLookup) Get a newColumnFileState
suitable for reading data.toString()
static ColumnFileState
writable
(ColumnFileTypeDetails typeDetails, File directory, String name, boolean hasHeader, Function<ColumnFileType, ColumnFileState> stateLookup, WritableLocalTableLocation tableLocation) Get a newColumnFileState
suitable for writing data.
-
Field Details
-
STATE_KEY
-
-
Method Details
-
writable
public static ColumnFileState writable(@NotNull ColumnFileTypeDetails typeDetails, @NotNull File directory, @NotNull String name, boolean hasHeader, @NotNull Function<ColumnFileType, ColumnFileState> stateLookup, @NotNull WritableLocalTableLocation tableLocation) Get a newColumnFileState
suitable for writing data.- Parameters:
typeDetails
- the type detailsdirectory
- the directory of the dataname
- the name of the filehasHeader
- if the file has headersstateLookup
- a function to retrieveColumnFileState
s based on the typetableLocation
- theWritableLocalTableLocation
for writing.- Returns:
- a new Writable column file state.
-
readOnly
public static ColumnFileState readOnly(@NotNull ColumnFileTypeDetails typeDetails, @NotNull File directory, @NotNull String name, boolean hasHeader, @NotNull Function<ColumnFileType, ColumnFileState> stateLookup) Get a newColumnFileState
suitable for reading data.- Parameters:
typeDetails
- the type detailsdirectory
- the directory of the dataname
- the name of the filehasHeader
- if the file has headersstateLookup
- a function to retrieveColumnFileState
s based on the type- Returns:
- a new read-only column file state.
-
toString
-
getBaseAccessor
-
getTypeDetails
-
getFile
-
makeBaseAccessor
-
getDataAccessor
-
getDataBufferStore
-
getByteOrder
-
readHeaderPrefix
public long readHeaderPrefix() -
getCachedHeaderPrefix
public long getCachedHeaderPrefix() -
getDataStartPosition
protected int getDataStartPosition()
-