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 classAn 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 newRemoteTableBuilderfor connecting to queries within a Core+ cluster. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull RemoteTableBuilderCreate a newRemoteTableBuilderfor the current cluster.static RemoteTableBuilderforRemoteCluster(@NotNull DeephavenClusterConnection clusterConnection) Create a newRemoteTableBuilderto connect to the specified remote cluster.forRemoteCluster(@NotNull String clusterUrl) Create a newRemoteTableBuilderto connect to the specified remote cluster.@NotNull RemoteTableBuilderisBlink(boolean isBlink) Mark the fetched table as a blink table.@NotNull RemoteTableBuilderSet the name of the query to fetch the table from.static voidsetLocalClusterDetails(@NotNull CorePlusClusterSessionFactory localClusterDetails) Set theCorePlusClusterSessionFactorydetails for the current cluster.@NotNull Tablesnapshot()Create a static snapshot of the entire upstreamTable.@NotNull TableCreate a static snapshot of the upstreamTableincluding only the specified columns.@NotNull TableCreate a static snapshot of the upstreamTableincluding only the specified columns.@NotNull TableSubscribe to the entire table using the defaultSubscriptionOptions.@NotNull Tablesubscribe(@NotNull SubscriptionOptions subscriptionOptions) Subscribe to the table using the specifiedSubscriptionOptions.@NotNull RemoteTableBuildertableDefinition(@NotNull TableDefinition tableDefinition) Set the prototypeTableDefinitionof the table to fetch.@NotNull RemoteTableBuilderSet the Table name to fetch from thequery.
-
Constructor Details
-
RemoteTableBuilder
Create a newRemoteTableBuilderfor connecting to queries within a Core+ cluster.- Parameters:
clusterDetails- the cluster details
-
-
Method Details
-
setLocalClusterDetails
public static void setLocalClusterDetails(@NotNull @NotNull CorePlusClusterSessionFactory localClusterDetails) Set theCorePlusClusterSessionFactorydetails for the current cluster.- Parameters:
localClusterDetails- the details.
-
forLocalCluster
Create a newRemoteTableBuilderfor the current cluster.- Returns:
- a new
RemoteTableBuilder
-
forRemoteCluster
public static RemoteTableBuilder.Unauthenticated forRemoteCluster(@NotNull @NotNull String clusterUrl) throws IOException Create a newRemoteTableBuilderto 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- if there is a problem connecting to the remote cluster
-
forRemoteCluster
public static RemoteTableBuilder forRemoteCluster(@NotNull @NotNull DeephavenClusterConnection clusterConnection) Create a newRemoteTableBuilderto 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 prototypeTableDefinitionof 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
-
isBlink
Mark the fetched table as a blink table. The remote table must also be a blink table or the subscription will fail.- Parameters:
isBlink- true if the table is a blink table- 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 upstreamTableincluding only the specified columns.- Parameters:
includedColumns- the columns to include.- Returns:
- the table snapshot.
-
snapshot
Create a static snapshot of the upstreamTableincluding only the specified columns.- Parameters:
includedColumns- the columns to include.- Returns:
- the table snapshot.
-