Package io.deephaven.web.client.api
Class WorkerConnection
java.lang.Object
io.deephaven.web.client.api.WorkerConnection
Non-exported class, manages the connection to a given worker server. Exported types like QueryInfo and Table will
refer to this, and allow us to try to keep track of how many open tables there are, so we can close the connection if
not in use.
Might make more sense to be part of QueryInfo, but this way we can WeakMap instances, check periodically if any
QueryInfos are left alive or event handlers still exist, and close connections that seem unused.
Except for the delegated call from QueryInfo.getTable, none of these calls will be possible in Connecting or
Disconnected state if done right. Failed state is possible, and we will want to think more about handling, possible
re-Promise-ing all of the things, or just return stale values if we have them.
Responsible for reconnecting to the query server when required - when that server disappears, and at least one table
is left un-closed.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckStatus(io.grpc.Status status) booleancheckStatus(io.grpc.StatusRuntimeException status) voidelemental2.promise.Promise<JsTable> emptyTable(double size) voidexportedTableUpdateMessage(TableTicket clientId, long size) org.apache.arrow.flight.impl.FlightServiceGrpc.FlightServiceStubvoidvoidgetBatcher(JsTable table) getCache()elemental2.promise.Promise<JsFigure> getFigure(JsVariableDefinition varDef) elemental2.promise.Promise<JsTreeTable> elemental2.promise.Promise<?> getJsObject(jsinterop.base.JsPropertyMap<Object> definitionObject) elemental2.promise.Promise<?> getObject(TypedTicket typedTicket) elemental2.promise.Promise<?> getObject(JsVariableDefinition definition) elemental2.promise.Promise<JsPartitionedTable> elemental2.promise.Promise<?> getSharedObject(SharedExportBytesUnion sharedExportBytes, String type) elemental2.promise.Promise<JsTable> getTable(JsVariableDefinition varDef, Boolean applyPreviewColumns) elemental2.promise.Promise<JsVariableDefinition> getVariableDefinition(String name, String type) elemental2.promise.Promise<JsWidget> getWidget(TypedTicket typedTicket) elemental2.promise.Promise<JsWidget> getWidget(JsVariableDefinition varDef) static booleanisTransportError(io.grpc.Status status) booleanisUsable()elemental2.promise.Promise<JsTable> mergeTables(JsTable[] tables, HasEventHandling failHandler) newState(JsTableFetch fetcher, String fetchSummary) newState(ClientTableState from, TableConfig to) newState(ClientTableState from, TableConfig to, TableTicket handle) newStateFromUnsolicitedTable(ExportedTableCreationResponse unsolicitedTable, String fetchSummary) elemental2.promise.Promise<JsTable> voidonOpen(BiConsumer<Void, String> callback) voidvoidreleaseHandle(TableTicket handle) voidreleaseTicket(Ticket ticket) Releases the ticket, indicating no client using this session will reference it any more.voidscheduleCheck(ClientTableState state) Schedules a deferred command to check the given state for active tables.elemental2.promise.Promise<SharedExportBytesUnion> shareObject(ServerObject object, SharedExportBytesUnion sharedTicketBytes) <ReqT,RespT>
BiDiStream.Factory<ReqT, RespT> subscribeToFieldUpdates(JsConsumer<JsVariableChanges> callback) subscribeToLogs(JsConsumer<LogItem> callback) elemental2.promise.Promise<JsTable> timeTable(double periodNanos, DateWrapper startTime) voidelemental2.promise.Promise<Object> whenServerReady(String operationName)
-
Constructor Details
-
WorkerConnection
-
-
Method Details
-
checkStatus
public boolean checkStatus(io.grpc.Status status) -
checkStatus
public boolean checkStatus(io.grpc.StatusRuntimeException status) -
isTransportError
public static boolean isTransportError(io.grpc.Status status) -
exportedTableUpdateMessage
-
connectionLost
public void connectionLost() -
forceReconnect
@JsMethod public void forceReconnect() -
forceClose
@JsMethod public void forceClose() -
getVariableDefinition
public elemental2.promise.Promise<JsVariableDefinition> getVariableDefinition(String name, String type) -
getTable
public elemental2.promise.Promise<JsTable> getTable(JsVariableDefinition varDef, @Nullable Boolean applyPreviewColumns) -
getObject
-
getJsObject
public elemental2.promise.Promise<?> getJsObject(jsinterop.base.JsPropertyMap<Object> definitionObject) -
getObject
-
whenServerReady
-
getPartitionedTable
public elemental2.promise.Promise<JsPartitionedTable> getPartitionedTable(JsVariableDefinition varDef) -
getHierarchicalTable
-
getFigure
-
getWidget
-
getWidget
-
registerSimpleReconnectable
-
unregisterSimpleReconnectable
-
tableServiceClient
-
consoleServiceClient
-
sessionServiceClient
-
flightServiceClient
public org.apache.arrow.flight.impl.FlightServiceGrpc.FlightServiceStub flightServiceClient() -
browserFlightServiceClient
-
inputTableServiceClient
-
objectServiceClient
-
partitionedTableServiceClient
-
storageServiceClient
-
configServiceClient
-
hierarchicalTableServiceClient
-
streamFactory
-
newTable
-
mergeTables
public elemental2.promise.Promise<JsTable> mergeTables(JsTable[] tables, HasEventHandling failHandler) -
getBatcher
-
newStateFromUnsolicitedTable
public ClientTableState newStateFromUnsolicitedTable(ExportedTableCreationResponse unsolicitedTable, String fetchSummary) -
newState
-
newState
-
newState
-
getCache
-
scheduleCheck
Schedules a deferred command to check the given state for active tables. -
releaseHandle
-
releaseTicket
Releases the ticket, indicating no client using this session will reference it any more.- Parameters:
ticket- the ticket to release
-
getReviver
-
isUsable
public boolean isUsable() -
getTickets
-
getServerConfigValue
-
onOpen
-
dump
-
emptyTable
-
timeTable
-