Package io.deephaven.web.client.api
Class JsPartitionedTable
java.lang.Object
io.deephaven.web.client.api.event.HasEventHandling
io.deephaven.web.client.api.lifecycle.HasLifecycle
io.deephaven.web.client.api.JsPartitionedTable
- All Implemented Interfaces:
ServerObject
@JsType(namespace="dh",
name="PartitionedTable")
public class JsPartitionedTable
extends HasLifecycle
implements ServerObject
Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
the server to get each Table. All tables will have the same structure.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.web.client.api.event.HasEventHandling
HasEventHandling.EventPair<T>
Nested classes/interfaces inherited from interface io.deephaven.web.client.api.ServerObject
ServerObject.Union
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.static final String
Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.static final String
Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.static final String
Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.Fields inherited from class io.deephaven.web.client.api.event.HasEventHandling
INTERNAL_EVENT_RELEASED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc.elemental2.promise.Promise<JsTable>
Fetch the underlying base table of the partitioned table.Column[]
An array of the columns in the tables that can be retrieved from this partitioned table, including both key and non-key columns.Column[]
An array of all the key columns that the tables are partitioned by.elemental2.core.JsSet<Object>
getKeys()
The set of all currently known keys.elemental2.promise.Promise<JsTable>
Deprecated.elemental2.promise.Promise<JsTable>
Open a new table that is the result of merging all constituent tables.elemental2.promise.Promise<@JsNullable JsTable>
Fetch the table with the given key.elemental2.promise.Promise<JsPartitionedTable>
refetch()
Indicate that a new session has been created on the server, and this object should re-create its corresponding server-side object if possible.int
size()
The count of known keys.Methods inherited from class io.deephaven.web.client.api.lifecycle.HasLifecycle
die, disconnected, nextReconnect, reconnect
Methods inherited from class io.deephaven.web.client.api.event.HasEventHandling
addEventListener, addEventListenerOneShot, addEventListenerOneShot, failureHandled, fireCriticalEvent, fireCriticalEvent, fireEvent, fireEvent, fireEvent, hasListener, hasListeners, isSuppress, logPrefix, nextEvent, removeEventListener, suppressEvents, unsuppressEvents
-
Field Details
-
EVENT_KEYADDED
Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.- See Also:
-
EVENT_DISCONNECT
Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.- See Also:
-
EVENT_RECONNECT
Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.- See Also:
-
EVENT_RECONNECTFAILED
Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.- See Also:
-
-
Constructor Details
-
JsPartitionedTable
-
-
Method Details
-
getConnection
- Specified by:
getConnection
in interfaceServerObject
-
refetch
Description copied from class:HasLifecycle
Indicate that a new session has been created on the server, and this object should re-create its corresponding server-side object if possible. Override this to implement custom behavior, being sure to call reconnect() when finished.- Overrides:
refetch
in classHasLifecycle
- Returns:
- a promise that will resolve when this object is reconnected
-
typedTicket
- Specified by:
typedTicket
in interfaceServerObject
-
getTable
Fetch the table with the given key. If the key does not exist, returns `null`.- Parameters:
key
- The key to fetch. An array of values for each key column, in the same order as the key columns are.- Returns:
- Promise of dh.Table, or `null` if the key does not exist.
-
getMergedTable
Open a new table that is the result of merging all constituent tables. SeePartitionedTable.merge()
for details.- Returns:
- A merged representation of the constituent tables.
-
getKeys
The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener for keyadded will ensure no keys are missed.- Returns:
- Set of Object
-
size
@JsProperty(name="size") public int size()The count of known keys.- Returns:
- int
-
getKeyColumns
An array of all the key columns that the tables are partitioned by.- Returns:
- Array of Column
-
getColumns
An array of the columns in the tables that can be retrieved from this partitioned table, including both key and non-key columns.- Returns:
- Array of Column
-
getKeyTable
Deprecated.Fetch a table containing all the valid keys of the partitioned table.- Returns:
- Promise of a Table
-
getBaseTable
Fetch the underlying base table of the partitioned table.- Returns:
- Promise of a Table
-
close
public void close()Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This will not affect tables in use.
-