Package io.deephaven.enterprise.remote
Class RemoteTableBuilder
java.lang.Object
io.deephaven.enterprise.remote.RemoteTableBuilder
A Builder class for creating reliable subscriptions to remote tables. Subscribed tables will gracefully handle
disconnections of the upstream table and reconnect when they become available.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
An interposed interface that forces users to authenticate with the remote system before they can call any subscription methods. -
Constructor Summary
ConstructorsConstructorDescriptionRemoteTableBuilder
(@NotNull CorePlusClusterSessionFactory clusterDetails) Create a newRemoteTableBuilder
for connecting to queries within a Core+ cluster. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull RemoteTableBuilder
Create a newRemoteTableBuilder
for the current cluster.static RemoteTableBuilder
forRemoteCluster
(@NotNull DeephavenClusterConnection clusterConnection) Create a newRemoteTableBuilder
to connect to the specified remote cluster.forRemoteCluster
(@NotNull String clusterUrl) Create a newRemoteTableBuilder
to connect to the specified remote cluster.@NotNull RemoteTableBuilder
Set the name of the query to fetch the table from.static void
setLocalClusterDetails
(@NotNull CorePlusClusterSessionFactory localClusterDetails) Set theCorePlusClusterSessionFactory
details for the current cluster.@NotNull Table
snapshot()
Create a static snapshot of the entire upstreamTable
.@NotNull Table
Create a static snapshot of the upstreamTable
including only the specified columns.@NotNull Table
Create a static snapshot of the upstreamTable
including only the specified columns.@NotNull Table
Subscribe to the entire table using the defaultSubscriptionOptions
.@NotNull Table
subscribe
(@NotNull SubscriptionOptions subscriptionOptions) Subscribe to the table using the specifiedSubscriptionOptions
.@NotNull RemoteTableBuilder
tableDefinition
(@NotNull TableDefinition tableDefinition) Set the prototypeTableDefinition
of the table to fetch.@NotNull RemoteTableBuilder
Set the Table name to fetch from thequery
.
-
Constructor Details
-
RemoteTableBuilder
Create a newRemoteTableBuilder
for connecting to queries within a Core+ cluster.- Parameters:
clusterDetails
- the cluster details
-
-
Method Details
-
setLocalClusterDetails
public static void setLocalClusterDetails(@NotNull @NotNull CorePlusClusterSessionFactory localClusterDetails) Set theCorePlusClusterSessionFactory
details for the current cluster.- Parameters:
localClusterDetails
- the details.
-
forLocalCluster
Create a newRemoteTableBuilder
for the current cluster.- Returns:
- a new
RemoteTableBuilder
-
forRemoteCluster
public static RemoteTableBuilder.Unauthenticated forRemoteCluster(@NotNull @NotNull String clusterUrl) throws IOException Create a newRemoteTableBuilder
to connect to the specified remote cluster. You must authenticate withRemoteTableBuilder.Unauthenticated.password(java.lang.String, java.lang.String)
orRemoteTableBuilder.Unauthenticated.privateKey(String)
before any tables can be created.- Parameters:
clusterUrl
- the url for the remote cluster- Returns:
- a new
RemoteTableBuilder.Unauthenticated
- Throws:
IOException
-
forRemoteCluster
public static RemoteTableBuilder forRemoteCluster(@NotNull @NotNull DeephavenClusterConnection clusterConnection) Create a newRemoteTableBuilder
to connect to the specified remote cluster. The passed in cluster connection must be authenticated. SeeDeephavenClusterConnection.password(String, String)
andDeephavenClusterConnection.privateKey(String)
.- Parameters:
clusterConnection
- the cluster connection- Returns:
- a new
RemoteTableBuilder
-
queryName
Set the name of the query to fetch the table from.- Parameters:
queryName
- the name of the Query- Returns:
- this
RemoteTableBuilder
-
tableName
Set the Table name to fetch from thequery
.- Parameters:
tableName
- the table name- Returns:
- this
RemoteTableBuilder
-
tableDefinition
@NotNull public @NotNull RemoteTableBuilder tableDefinition(@NotNull @NotNull TableDefinition tableDefinition) Set the prototypeTableDefinition
of the table to fetch. If this is not specified, the definition will be discovered by connecting to the query, which requires it to be available.- Parameters:
tableDefinition
- the prototypeTableDefinition
- Returns:
- this
RemoteTableBuilder
-
subscribe
Subscribe to the entire table using the defaultSubscriptionOptions
.- Returns:
- the subscribed
Table
-
subscribe
Subscribe to the table using the specifiedSubscriptionOptions
.- Parameters:
subscriptionOptions
- theSubscriptionOptions
- Returns:
- the subscribed
Table
-
snapshot
Create a static snapshot of the entire upstreamTable
.- Returns:
- the table snapshot.
-
snapshot
Create a static snapshot of the upstreamTable
including only the specified columns.- Parameters:
includedColumns
- the columns to include.- Returns:
- the table snapshot.
-
snapshot
Create a static snapshot of the upstreamTable
including only the specified columns.- Parameters:
includedColumns
- the columns to include.- Returns:
- the table snapshot.
-