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 classDescriptor object for serialization surrogate.static classstatic classstatic interfaceTableProxy 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 TypeMethodDescriptionvoidaddReferent(Object referent) voidclose()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 columnsintgetId()getViewport(RemoteTableHandle.TableProxy tableProxy) getViewportWithClient(RemoteTableHandle.TableProxy tableProxy, boolean allocateClient) booleanhasAttribute(String name) See if the table has the specified attribute.booleanisFlat()Does this RemoteTableHandle represent a flat table?booleanisLive()voidlistenToTableErrors(ListenerBase listener) voidlistenToTableSizeUpdates(LongConsumer longConsumer) preFetchAttributesForProxy(Collection<String> preFetch, Object proxy) voidremoveErrorListener(ListenerBase errorListener) voidvoidremoveSizeUpdateListener(LongConsumer longConsumer) voidremoveViewPort(ReplicatedTable viewport) resolve()voidsetViewportTableProxy(RemoteTableHandle.TableProxy viewportTableProxy) Set this client's viewport to the provided handle.longsize()The size of this data structure.subscribeToPreemptiveUpdates(RemoteTableHandle.TableProxy tableProxy, boolean isViewPort) toString()voidupdatePreemptiveSubscriptionAsync(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, waitMethods 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:
closein interfaceAutoCloseable- Specified by:
closein 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:
invokein 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
InitialSnapshotcontaining 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
InitialSnapshotcontaining 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:LongSizedDataStructureThe size of this data structure.- Specified by:
sizein interfaceLongSizedDataStructure- Returns:
- The size
-
toString
-