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 Classes Modifier and Type Class Description static class
RemoteTableHandle.Descriptor
Descriptor object for serialization surrogate.static class
RemoteTableHandle.DisconnectedException
static class
RemoteTableHandle.FlatIndexInvocationHandler
static interface
RemoteTableHandle.TableProxy
TableProxy interface, hijacked below.static class
RemoteTableHandle.ViewportAndClient
-
Field Summary
Fields Modifier and Type Field Description static com.fishlib.base.hash.KeyedIntObjectKey<RemoteTableHandle>
KEY
-
Constructor Summary
Constructors Constructor Description RemoteTableHandle(RemoteTableHandleManager tableManager, com.fishlib.io.logger.Logger log, ExportedTableCreationMessage creationMessage)
-
Method Summary
-
Field Details
-
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
-