Class InMemoryAppendableColumn<INPUT_TYPE,DATA_TYPE>
java.lang.Object
io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.BaseAppendableColumn<DATA_TYPE>
io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn<INPUT_TYPE>
io.deephaven.enterprise.binarystore.InMemoryAppendableColumn<INPUT_TYPE,DATA_TYPE>
- Type Parameters:
INPUT_TYPE- the expected input type for the columnDATA_TYPE- the actual cell-level type for the column
- All Implemented Interfaces:
io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.AppendableColumn<INPUT_TYPE>,io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.TableTransactionProcessor
public abstract class InMemoryAppendableColumn<INPUT_TYPE,DATA_TYPE>
extends io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn<INPUT_TYPE>
A
LocalAppendableColumn implementation which stores column data in-memory. This implementation is not meant
to be used for disk-writing a column-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn
io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn.ValueSupplier<DATA_TYPE extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ArrayBackedColumnSource<?>protected longprotected final ResettableWritableChunk<?>Fields inherited from class io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.BaseAppendableColumn
name, typeFields inherited from interface io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.AppendableColumn
DEFAULT_CHUNK_CAPACITY -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidadd(INPUT_TYPE value) voidaddByte(byte value) voidaddByte(byte value, long count) voidaddBytes(@io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull byte[] values, int startIndex, int length) voidaddBytes(@NotNull ByteBuffer buffer) voidaddChar(char value) voidaddChar(char value, long count) voidaddChars(@io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull char[] values, int startIndex, int length) voidaddComputed(int count, @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn.ValueSupplier<INPUT_TYPE> valueSupplier) voidaddDouble(double value) voidaddDouble(double value, long count) voidaddDoubles(@io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull double[] values, int startIndex, int length) voidaddEncoded(int count, @NotNull IntFunction<ByteBuffer> valueSupplier) voidaddFloat(float value) voidaddFloat(float value, long count) voidaddFloats(@io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull float[] values, int startIndex, int length) voidaddFromBooleanChunk(@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.ObjectChunk<Boolean, ? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) voidaddFromByteChunk(@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.ByteChunk<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) voidaddFromCharChunk(@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.CharChunk<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) voidaddFromDoubleChunk(@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.DoubleChunk<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) voidaddFromFloatChunk(@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.FloatChunk<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) voidaddFromIntChunk(@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.IntChunk<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) voidaddFromLongChunk(@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.LongChunk<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) voidaddFromShortChunk(@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.ShortChunk<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) voidaddInt(int value) voidaddInt(int value, long count) voidaddInts(@io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull int[] values, int startIndex, int length) voidaddLong(long value) voidaddLong(long value, long count) voidaddLongs(@io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull long[] values, int startIndex, int length) voidaddShort(short value) voidaddShort(short value, long count) voidaddShorts(@io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull short[] values, int startIndex, int length) voidclose()protected voidensureAdditionalCapacity(long length) voidvoidvoidforce()static <T> InMemoryAppendableColumn<?,T> getAppendableColumn(@NotNull String name, ColumnDefinition<T> colDef, Collection<String> symbolTableCols) Gets an appropriateInMemoryAppendableColumninstance for the requestedColumnDefinitionabstract ColumnSource<DATA_TYPE>Gets theColumnSourceidentified by thisLocalAppendableColumninstance.longbooleanprotected voidmaybeResetDestinationSlice(@NotNull ResettableWritableChunk<?> chunk) If the destination slicechunkis full, reset to the appropriate backing store slice fornextPos.voidrevertTo(long lastGoodPos) Reverts a number of previously-added rows in thisInMemoryAppendableColumninstancevoidMethods inherited from class io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn
addFromObjectChunkMethods inherited from class io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.BaseAppendableColumn
add, add, addBoolean, addBoolean, addBooleans, checkArrayAddBounds, encodeExternalizable, encodeSerializable, getAddHelper, getName, getTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.AppendableColumn
addFromArray, addFromBoxedValue, addFromBoxedValue, addFromChunk, addFromChunkSource, addFromChunkSource, addFromChunkSource, addFromColumnSource, addFromColumnSource, addFromColumnSource, addFromColumnSource, addFromDataColumn
-
Field Details
-
genericSource
-
resettableChunk
-
nextPos
protected long nextPos
-
-
Method Details
-
revertTo
public void revertTo(long lastGoodPos) Reverts a number of previously-added rows in thisInMemoryAppendableColumninstance- Parameters:
lastGoodPos- the last known valid position within theInMemoryAppendableColumn
-
ensureAdditionalCapacity
protected void ensureAdditionalCapacity(long length) -
maybeResetDestinationSlice
If the destination slicechunkis full, reset to the appropriate backing store slice fornextPos. -
getColumnSource
Gets theColumnSourceidentified by thisLocalAppendableColumninstance. All data for the column is stored in memory.- Returns:
- a new
ColumnSourceinstance
-
getSizeInBytes
public long getSizeInBytes()- Specified by:
getSizeInBytesin classio.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn<INPUT_TYPE>
-
ensureFileExists
public void ensureFileExists()- Specified by:
ensureFileExistsin classio.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn<INPUT_TYPE>
-
force
public void force() -
close
public void close() -
addByte
public void addByte(byte value) -
addChar
public void addChar(char value) -
addDouble
public void addDouble(double value) -
addFloat
public void addFloat(float value) -
addInt
public void addInt(int value) -
addLong
public void addLong(long value) -
addShort
public void addShort(short value) -
add
- Specified by:
addin interfaceio.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.AppendableColumn<INPUT_TYPE>- Overrides:
addin classio.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.BaseAppendableColumn<INPUT_TYPE>
-
addByte
public void addByte(byte value, long count) -
addChar
public void addChar(char value, long count) -
addDouble
public void addDouble(double value, long count) -
addFloat
public void addFloat(float value, long count) -
addInt
public void addInt(int value, long count) -
addLong
public void addLong(long value, long count) -
addShort
public void addShort(short value, long count) -
addBytes
public void addBytes(@NotNull @io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull byte[] values, int startIndex, int length) -
addBytes
-
addChars
public void addChars(@NotNull @io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull char[] values, int startIndex, int length) -
addDoubles
public void addDoubles(@NotNull @io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull double[] values, int startIndex, int length) -
addFloats
public void addFloats(@NotNull @io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull float[] values, int startIndex, int length) -
addInts
public void addInts(@NotNull @io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull int[] values, int startIndex, int length) -
addLongs
public void addLongs(@NotNull @io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull long[] values, int startIndex, int length) -
addShorts
public void addShorts(@NotNull @io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull short[] values, int startIndex, int length) -
addFromBooleanChunk
public void addFromBooleanChunk(@NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.ObjectChunk<Boolean, ? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) -
addFromByteChunk
public void addFromByteChunk(@NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.ByteChunk<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) -
addFromCharChunk
public void addFromCharChunk(@NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.CharChunk<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) -
addFromDoubleChunk
public void addFromDoubleChunk(@NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.DoubleChunk<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) -
addFromFloatChunk
public void addFromFloatChunk(@NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.FloatChunk<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) -
addFromIntChunk
public void addFromIntChunk(@NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.IntChunk<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) -
addFromLongChunk
public void addFromLongChunk(@NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.LongChunk<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) -
addFromShortChunk
public void addFromShortChunk(@NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.ShortChunk<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.sources.chunk.Attributes.Values> source) -
inTransaction
public boolean inTransaction() -
startTransaction
public void startTransaction() -
abortTransaction
public void abortTransaction() -
finishTransaction
public void finishTransaction() -
addComputed
public void addComputed(int count, @NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn.ValueSupplier<INPUT_TYPE> valueSupplier) throws IOException - Overrides:
addComputedin classio.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn<INPUT_TYPE>- Throws:
IOException
-
addEncoded
- Overrides:
addEncodedin classio.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn<INPUT_TYPE>
-
getAppendableColumn
public static <T> InMemoryAppendableColumn<?,T> getAppendableColumn(@NotNull @NotNull String name, ColumnDefinition<T> colDef, Collection<String> symbolTableCols) Gets an appropriateInMemoryAppendableColumninstance for the requestedColumnDefinition- Type Parameters:
T- the cell-type of the column- Parameters:
name- the column namecolDef- theColumnDefinitionwhich identifies the returnedInMemoryAppendableColumnimplementationsymbolTableCols- a collection of column-names which should be treated as having a SymbolTable- Returns:
- an appropriate
InMemoryAppendableColumnimplementation for the requestedColumnDefinition
-