Class RemoteTableHandle
java.lang.Object
com.illumon.iris.db.tables.remote.RemoteTableHandle
- All Implemented Interfaces:
LongSizedDataStructure
,Closeable
,AutoCloseable
,InvocationHandler
public class RemoteTableHandle
extends Object
implements InvocationHandler, Closeable, LongSizedDataStructure
Client-side handle for a remote table.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Descriptor object for serialization surrogate.static class
static class
static interface
TableProxy interface, hijacked below.static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.deephaven.hash.KeyedIntObjectKey<RemoteTableHandle>
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteTableHandle
(RemoteTableHandleManager tableManager, com.fishlib.io.logger.Logger log, ExportedTableCreationMessage creationMessage) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addReferent
(Object referent) void
close()
getAttribute
(String name) Get the value for the specified attribute.getDirect
(int columnIndex) Retrieve the entire column specified from the underlying table.Retrieve the data for all of the specified columns.Retrieve the specified rows (by position) for the specified columnsint
getId()
getViewport
(RemoteTableHandle.TableProxy tableProxy) getViewportWithClient
(RemoteTableHandle.TableProxy tableProxy, boolean allocateClient) boolean
hasAttribute
(String name) See if the table has the specified attribute.boolean
isFlat()
Does this RemoteTableHandle represent a flat table?boolean
isLive()
void
listenToTableErrors
(ListenerBase listener) void
listenToTableSizeUpdates
(LongConsumer longConsumer) preFetchAttributesForProxy
(Collection<String> preFetch, Object proxy) void
removeErrorListener
(ListenerBase errorListener) void
void
removeSizeUpdateListener
(LongConsumer longConsumer) void
removeViewPort
(ReplicatedTable viewport) resolve()
void
setViewportTableProxy
(RemoteTableHandle.TableProxy viewportTableProxy) Set this client's viewport to the provided handle.long
size()
The size of this data structure.subscribeToPreemptiveUpdates
(RemoteTableHandle.TableProxy tableProxy, boolean isViewPort) toString()
void
updatePreemptiveSubscriptionAsync
(BitSet newColumns) updatePreemptiveViewportAndColumnsAsync
(Index newViewPort, BitSet columns) updatePreemptiveViewportAsync
(Index newViewPort) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.util.LongSizedDataStructure
intSize, intSize
-
Field Details
-
KEY
-
-
Constructor Details
-
RemoteTableHandle
public RemoteTableHandle(RemoteTableHandleManager tableManager, com.fishlib.io.logger.Logger log, ExportedTableCreationMessage creationMessage)
-
-
Method Details
-
getTableManager
-
addReferent
-
getId
public int getId() -
isLive
public boolean isLive() -
resolve
-
hasAttribute
See if the table has the specified attribute. -
getAttribute
Get the value for the specified attribute. If the attribute was not cached locally it will attempt to retrieve it. -
preFetchAttributesForProxy
-
getAttributeNames
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
isFlat
public boolean isFlat()Does this RemoteTableHandle represent a flat table? -
subscribeToPreemptiveUpdates
@VisibleForTesting public ReplicatedTable subscribeToPreemptiveUpdates(@NotNull RemoteTableHandle.TableProxy tableProxy, boolean isViewPort) -
unsubscribeFromPreemptiveUpdates
public void unsubscribeFromPreemptiveUpdates() -
removeViewPort
-
updatePreemptiveSubscriptionAsync
-
updatePreemptiveViewportAsync
-
updatePreemptiveViewportAndColumnsAsync
-
invoke
- Specified by:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-
getInputTable
-
getColumns
-
listenToTableErrors
-
removeErrorListener
-
removeErrorListeners
public void removeErrorListeners() -
listenToTableSizeUpdates
-
removeSizeUpdateListener
-
getDirect
Retrieve the entire column specified from the underlying table.- Parameters:
columnIndex
- the index of the column- Returns:
- an array containing the data of the column.
-
getDirect
Retrieve the data for all of the specified columns.- Parameters:
columns
- the columns to retrieve.- Returns:
- an
InitialSnapshot
containing the data. Users may useInitialSnapshotTable.setupInitialSnapshotTable(Table, InitialSnapshot)
to convert it into aQueryTable
-
getDirect
Retrieve the specified rows (by position) for the specified columns- Parameters:
columns
- the columns to get data forpositions
- an index of positions to retrieve.- Returns:
- an
InitialSnapshot
containing the data. Users may useInitialSnapshotTable.setupInitialSnapshotTable(Table, InitialSnapshot)
to convert it into aQueryTable
-
getViewport
-
getViewportWithClient
public RemoteTableHandle.ViewportAndClient getViewportWithClient(@NotNull RemoteTableHandle.TableProxy tableProxy, boolean allocateClient) -
setViewportTableProxy
Set this client's viewport to the provided handle. It is up to the caller to ensure that the viewport actually matches this table, or undefined results occur. The handle must be flat and preemptive.- Parameters:
viewportTableProxy
- the handle to use for our viewport
-
getDefinition
-
size
public long size()Description copied from interface:LongSizedDataStructure
The size of this data structure.- Specified by:
size
in interfaceLongSizedDataStructure
- Returns:
- The size
-
toString
-