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 column
DATA_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

    Fields
    Modifier and Type
    Field
    Description
    protected final ArrayBackedColumnSource<?>
     
    protected long
     
    protected final ResettableWritableChunk<?>
     

    Fields inherited from class io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.BaseAppendableColumn

    name, type

    Fields inherited from interface io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.AppendableColumn

    DEFAULT_CHUNK_CAPACITY
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    add(INPUT_TYPE value)
     
    void
    addByte(byte value)
     
    void
    addByte(byte value, long count)
     
    void
    addBytes(@io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull byte[] values, int startIndex, int length)
     
    void
    addBytes(@NotNull ByteBuffer buffer)
     
    void
    addChar(char value)
     
    void
    addChar(char value, long count)
     
    void
    addChars(@io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull char[] values, int startIndex, int length)
     
    void
    addComputed(int count, @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn.ValueSupplier<INPUT_TYPE> valueSupplier)
     
    void
    addDouble(double value)
     
    void
    addDouble(double value, long count)
     
    void
    addDoubles(@io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull double[] values, int startIndex, int length)
     
    void
    addEncoded(int count, @NotNull IntFunction<ByteBuffer> valueSupplier)
     
    void
    addFloat(float value)
     
    void
    addFloat(float value, long count)
     
    void
    addFloats(@io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull float[] values, int startIndex, int length)
     
    void
    addFromBooleanChunk(@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)
     
    void
    addFromByteChunk(@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)
     
    void
    addFromCharChunk(@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)
     
    void
    addFromDoubleChunk(@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)
     
    void
    addFromFloatChunk(@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)
     
    void
    addFromIntChunk(@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)
     
    void
    addFromLongChunk(@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)
     
    void
    addFromShortChunk(@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)
     
    void
    addInt(int value)
     
    void
    addInt(int value, long count)
     
    void
    addInts(@io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull int[] values, int startIndex, int length)
     
    void
    addLong(long value)
     
    void
    addLong(long value, long count)
     
    void
    addLongs(@io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull long[] values, int startIndex, int length)
     
    void
    addShort(short value)
     
    void
    addShort(short value, long count)
     
    void
    addShorts(@io.deephaven.shadow.enterprise.org.jetbrains.annotations.NotNull short[] values, int startIndex, int length)
     
    void
     
    protected void
     
    void
     
    void
     
    void
     
    static <T> InMemoryAppendableColumn<?,T>
    getAppendableColumn(@NotNull String name, ColumnDefinition<T> colDef, Collection<String> symbolTableCols)
    Gets an appropriate InMemoryAppendableColumn instance for the requested ColumnDefinition
    Gets the ColumnSource identified by this LocalAppendableColumn instance.
    long
     
    boolean
     
    protected void
    If the destination slice chunk is full, reset to the appropriate backing store slice for nextPos.
    void
    revertTo(long lastGoodPos)
    Reverts a number of previously-added rows in this InMemoryAppendableColumn instance
    void
     

    Methods inherited from class io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn

    addFromObjectChunk

    Methods inherited from class io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.BaseAppendableColumn

    add, add, addBoolean, addBoolean, addBooleans, checkArrayAddBounds, encodeExternalizable, encodeSerializable, getAddHelper, getName, getType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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

  • Method Details

    • revertTo

      public void revertTo(long lastGoodPos)
      Reverts a number of previously-added rows in this InMemoryAppendableColumn instance
      Parameters:
      lastGoodPos - the last known valid position within the InMemoryAppendableColumn
    • ensureAdditionalCapacity

      protected void ensureAdditionalCapacity(long length)
    • maybeResetDestinationSlice

      protected void maybeResetDestinationSlice(@NotNull @NotNull ResettableWritableChunk<?> chunk)
      If the destination slice chunk is full, reset to the appropriate backing store slice for nextPos.
    • getColumnSource

      public abstract ColumnSource<DATA_TYPE> getColumnSource()
      Gets the ColumnSource identified by this LocalAppendableColumn instance. All data for the column is stored in memory.
      Returns:
      a new ColumnSource instance
    • getSizeInBytes

      public long getSizeInBytes()
      Specified by:
      getSizeInBytes in class io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn<INPUT_TYPE>
    • ensureFileExists

      public void ensureFileExists()
      Specified by:
      ensureFileExists in class io.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

      public void add(INPUT_TYPE value)
      Specified by:
      add in interface io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.AppendableColumn<INPUT_TYPE>
      Overrides:
      add in class io.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

      public void addBytes(@NotNull @NotNull ByteBuffer buffer)
    • 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:
      addComputed in class io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn<INPUT_TYPE>
      Throws:
      IOException
    • addEncoded

      public void addEncoded(int count, @NotNull @NotNull IntFunction<ByteBuffer> valueSupplier)
      Overrides:
      addEncoded in class io.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 appropriate InMemoryAppendableColumn instance for the requested ColumnDefinition
      Type Parameters:
      T - the cell-type of the column
      Parameters:
      name - the column name
      colDef - the ColumnDefinition which identifies the returned InMemoryAppendableColumn implementation
      symbolTableCols - a collection of column-names which should be treated as having a SymbolTable
      Returns:
      an appropriate InMemoryAppendableColumn implementation for the requested ColumnDefinition