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:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
AbstractColumnSource.DefaultedImmutable<DATA_TYPE>, AbstractColumnSource.DefaultedMutable<DATA_TYPE>, AbstractColumnSource.IsSerializableNested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
ChunkSource.FillContext, ChunkSource.GetContext, ChunkSource.WithPrev<ATTR extends Attributes.Any>Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
DefaultChunkSource.SupportsContiguousGet<ATTR extends Attributes.Any>, DefaultChunkSource.WithPrev<ATTR extends Attributes.Any> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static Runnableprotected final ViewportColumnTableHolderFields inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
componentType, typeFields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAYFields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource.WithPrev
ZERO_LENGTH_CHUNK_SOURCE_WITH_PREV_ARRAYFields inherited from interface com.illumon.iris.db.v2.sources.ColumnSource
ZERO_LENGTH_COLUMN_SOURCE_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionViewportColumnSource(Class<T> type, RemoteTableHandle.TableProxy tableProxy, int columnIndex, String sourceName) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGet a local copy of the pre-get callback, and execute it if non-null.getPrev(long index) Get the previous value at the index.booleanDetermine if this column source is immutable, meaning that the values at a given index key never change.voidstatic voidsetPregetCallback(Runnable callback) Invoke this callback before each get operation.Methods inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
allowsReinterpret, canUseGrouping, defaultFillChunk, doReinterpret, fillChunk, fillPrevChunk, getComponentType, getGroupingBuilder, getGroupingProvider, getNativeType, getType, hasGrouping, hasGrouping, isSerializable, match, matchWithGrouping, reinterpret, setGroupingProviderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
getChunkTypeMethods inherited from interface com.illumon.iris.db.v2.sources.ColumnSource
cast, createPreviousTuple, createTuple, createTupleFromValues, exportElement, exportElement, exportToExternalKey, getColumnSources, getPrevSource, releaseCachedResources, startTrackingPrevValuesMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, makeFillContext, makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource.WithPrev
getPrevChunk, getPrevChunk, getPrevChunkByFillingMethods inherited from interface com.illumon.iris.db.v2.sources.ElementSource
get, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getPrevBoolean, getPrevByte, getPrevChar, getPrevDouble, getPrevFloat, getPrevInt, getPrevLong, getPrevShort, getShortMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.FillContextMaker
makeFillContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.GetContextMaker
makeGetContextMethods inherited from interface com.illumon.iris.db.v2.tuples.TupleExporter
exportElementReinterpretedMethods inherited from interface com.illumon.iris.db.v2.tuples.TupleSource
createTupleFromReinterpretedValues
-
Field Details
-
pregetCallback
-
viewportColumnTableHolder
-
-
Constructor Details
-
ViewportColumnSource
public ViewportColumnSource(@NotNull Class<T> type, @NotNull RemoteTableHandle.TableProxy tableProxy, int columnIndex, String sourceName)
-
-
Method Details
-
getPrev
Description copied from interface:ElementSourceGet the previous value at the index. Previous values are used during anLTMupdatecycle to process changes in data. Duringnormaloperation previous values will be identical tocurrentvalues.- Specified by:
getPrevin interfaceElementSource<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:ColumnSourceDetermine if this column source is immutable, meaning that the values at a given index key never change.- Specified by:
isImmutablein interfaceColumnSource<T>- Returns:
- true if the values at a given index of the column source never change, false otherwise
-
maybeCloseViewport
public void maybeCloseViewport()- Specified by:
maybeCloseViewportin interfaceRemoteTableHandleManager.CloseableViewportColumn
-
setPregetCallback
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.
-