Class ViewportColumnSource<T>

java.lang.Object
com.illumon.iris.db.v2.sources.AbstractColumnSource<T>
com.illumon.iris.db.tables.remote.ViewportColumnSource<T>
All Implemented Interfaces:
RemoteTableHandleManager.CloseableViewportColumn, ChunkSource<Attributes.Values>, ChunkSource.WithPrev<Attributes.Values>, DefaultChunkSource<Attributes.Values>, DefaultChunkSource.WithPrev<Attributes.Values>, FillContextMaker, GetContextMaker, ColumnSource<T>, ElementSource<T>, Releasable, TupleExporter<T>, TupleSource<T>, Serializable

public abstract class ViewportColumnSource<T> extends AbstractColumnSource<T> implements RemoteTableHandleManager.CloseableViewportColumn
ColumnSource used by RemoteTableHandles, backed by a ReplicatedTable viewport. The get() operations will open a viewport (if not already open); and then wait for the accessed cell to become populated before returning it.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getPrev

      public T getPrev(long index)
      Description copied from interface: ElementSource
      Get the previous value at the index. Previous values are used during an LTM update cycle to process changes in data. During normal operation previous values will be identical to current values.
      Specified by:
      getPrev in interface ElementSource<T>
      Parameters:
      index - the location in index space to get the value from.
      Returns:
      the previous value at the index, or null.
    • isImmutable

      public boolean isImmutable()
      Description copied from interface: ColumnSource
      Determine if this column source is immutable, meaning that the values at a given index key never change.
      Specified by:
      isImmutable in interface ColumnSource<T>
      Returns:
      true if the values at a given index of the column source never change, false otherwise
    • maybeCloseViewport

      public void maybeCloseViewport()
      Specified by:
      maybeCloseViewport in interface RemoteTableHandleManager.CloseableViewportColumn
    • setPregetCallback

      public static void setPregetCallback(Runnable callback)
      Invoke this callback before each get operation. The intended use is to check for invalid usage of ViewportColumnSources on the Swing EDT.
      Parameters:
      callback - the callback to invoke before get
    • doPregetCallback

      protected void doPregetCallback()
      Get a local copy of the pre-get callback, and execute it if non-null.