Interface PersistentQueryControllerClient
- All Superinterfaces:
- PersistentQueryScriptSource
- All Known Implementing Classes:
- PersistentQueryControllerClientImpl
Implementations of this interface provide a client that can communicate with the Persistent Query Controller to query
 and manage the state of Persistent Queries.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAn object that will be notified of changes to the state of the Controller.static classA basicPersistentQueryControllerClient.Observerimplementation with do-nothing methods.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddObserver(@NotNull PersistentQueryControllerClient.Observer observer) Add an Observer.voidaddObserverAndGetData(@NotNull PersistentQueryControllerClient.Observer observer) Add an Observer.longaddQuery(@NotNull PersistentQueryConfigMessage config) Adds a configuration to the controller's hash table.booleanauthenticate(@NotNull AuthToken token) Use the specified auth token to authenticate this client to the hashtable server.@Nullable PersistentQueryInfoMessageget(long querySerial) Get theinfofor the specified query serial.Get theinfofor the specified query name.@Nullable PersistentQueryInfoMessageGet theinfofor the specified query owner and name.@NotNull ControllerConfigurationMessageGet the currentControllerConfigurationMessage.@NotNull Map<Long,PersistentQueryInfoMessage> Get a copy of the current set of query data.booleanCheck if the client is connected to the Controller.default voidmodifyQuery(@NotNull PersistentQueryConfigMessage config) Modifies a configuration in the controller's hash table, and restart the query if it was running.voidmodifyQuery(@NotNull PersistentQueryConfigMessage config, boolean restartIfRunning) Modifies a configuration in the controller's hash table.voidCommand the PersistentQueryController to reload parts of its configuration without requiring a controller restart.voidremoveObserver(@NotNull PersistentQueryControllerClient.Observer observer) Remove the specifiedPersistentQueryControllerClient.Observerfrom the notification list.voidremoveQuery(long serialId) Removes a configuration from the controller's hash table by serial ID.default voidremoveQuery(@NotNull PersistentQueryConfigMessage config) Removes a configuration from the controller's hash table.default voidrestartQueries(@NotNull List<PersistentQueryConfigMessage> configs) Restarts one or more persistent queries.default voidrestartQueriesBySerial(@org.jetbrains.annotations.NotNull long[] querySerials) Restarts one or more persistent queries.voidrestartQueriesBySerial(@NotNull List<Long> querySerials) Restarts one or more persistent queries.default voidrestartQuery(@NotNull PersistentQueryConfigMessage config) Restart a persistent query.voidrestartReplicas(@NotNull List<ReplicaSpecifier> replicas) Restart one or more query replicas and/or spares.voidMake this client ephemeral.voidshutdown()Shut down the client.default voidstopQueries(@NotNull List<PersistentQueryConfigMessage> configs) Stops one or more persistent queries.default voidstopQueriesBySerial(@org.jetbrains.annotations.NotNull long[] querySerials) Stops one or more persistent query by serial id.voidstopQueriesBySerial(@NotNull List<Long> querySerials) Stop the specified queries by serial.default voidstopQuery(@NotNull PersistentQueryConfigMessage config) Stops a persistent query.voidSubscribe for updates for all visible queries.voidupdateQueryStatus(long querySerial, String processInfoId, @Nullable PersistentQueryStatusEnum status, @Nullable Map<String, ExportedObjectInfoMessage> scopeFields, @Nullable Map<String, String[]> tableGroups) Publish an update for a persistent query.Methods inherited from interface io.deephaven.enterprise.dnd.controller.PersistentQueryScriptSourcegetScriptBody, getScriptBody, getScriptBodyByQuery, getScriptBodyByQuery, getScriptBodyByUser, getScriptBodyByUser, getScriptPaths, getScriptPaths, getScriptPathsByQuery, getScriptPathsByQuery, getScriptPathsByUser, getScriptPathsByUser
- 
Method Details- 
addObserverAdd an Observer. If the controller is available thePersistentQueryControllerClient.Observer.handleConnectionEstablished()will be invoked immediately. No initialputevents will be generated. If you want an initial snapshot with registration useaddObserverAndGetData(Observer)- Parameters:
- observer- the- PersistentQueryControllerClient.Observerto add
 
- 
addObserverAndGetDataAdd an Observer. If the controller is available thePersistentQueryControllerClient.Observer.handleConnectionEstablished()will be invoked immediately. Theputmethod will be immediately invoked for each existing query.- Parameters:
- observer- the- PersistentQueryControllerClient.Observerto add
 
- 
removeObserverRemove the specifiedPersistentQueryControllerClient.Observerfrom the notification list.- Parameters:
- observer- the observer to remove.
 
- 
getGet theinfofor the specified query serial.- Parameters:
- querySerial- the query serial
- Returns:
- the infoor null if it did not exist.
 
- 
getGet theinfofor the specified query name.- Parameters:
- name- the name of the query
- Returns:
- the infoif it exists.
 
- 
get@Nullable @Nullable PersistentQueryInfoMessage get(@NotNull @NotNull String owner, @NotNull @NotNull String name) Get theinfofor the specified query owner and name.- Parameters:
- owner- the expected owner of the query
- name- the name of the query
- Returns:
- the infoif it exists.
 
- 
getDataCopyGet a copy of the current set of query data.- Returns:
- a copy of the current set of queries.
 
- 
isConnectedboolean isConnected()Check if the client is connected to the Controller.- Returns:
- trueif is connected,- falseotherwise
 
- 
setEphemeralvoid setEphemeral()Make this client ephemeral. An Ephemeral client will not try to reconnect once it has lost its connection.
- 
authenticateUse the specified auth token to authenticate this client to the hashtable server.- Parameters:
- token- the token for authentication
- Returns:
- true if authentication was successful.
 
- 
subscribeToAllSubscribe for updates for all visible queries. This method will block until subscription is complete, or an error occurs.- Throws:
- UncheckedDeephavenException- If an error occurs
 
- 
shutdownShut down the client.- Throws:
- IOException- if an error occurs while shutting down
 
- 
getConfigurationGet the currentControllerConfigurationMessage.- Returns:
- the current controller configuration
 
- 
reloadConfigurationvoid reloadConfiguration()Command the PersistentQueryController to reload parts of its configuration without requiring a controller restart. The controller will broadcast the updated configuration to all connected clients.Note that not all properties or configuration parameters may be reloaded. 
- 
addQueryAdds a configuration to the controller's hash table.- Parameters:
- config- the configuration to add
- Returns:
- the serial number of the added configuration
 
- 
modifyQueryModifies a configuration in the controller's hash table, and restart the query if it was running.- Parameters:
- config- the updated configuration
 
- 
modifyQueryModifies a configuration in the controller's hash table.- Parameters:
- config- the updated configuration
- restartIfRunning- restart the query when it is running if set to true
 
- 
removeQueryRemoves a configuration from the controller's hash table.- Parameters:
- config- the configuration to remove
 
- 
removeQueryvoid removeQuery(long serialId) Removes a configuration from the controller's hash table by serial ID.- Parameters:
- serialId- the serial ID of configuration to remove
 
- 
restartQueryRestart a persistent query. This implementation delegates torestartQueries(List))}.- Parameters:
- config- the persistent query configuration to be restarted.
 
- 
restartQueriesRestarts one or more persistent queries.- Parameters:
- configs- the persistent query configurations to be restarted
 
- 
restartQueriesBySerialdefault void restartQueriesBySerial(@NotNull @org.jetbrains.annotations.NotNull long[] querySerials) Restarts one or more persistent queries.- Parameters:
- querySerials- an array of serial ids to restart
 
- 
restartQueriesBySerialRestarts one or more persistent queries.- Parameters:
- querySerials- a list of serial ids to restart
 
- 
restartReplicasRestart one or more query replicas and/or spares.- Parameters:
- replicas- the replicas or spares to restart.
 
- 
stopQueryStops a persistent query.- Parameters:
- config- the persistent query configuration to be stopped.
 
- 
stopQueriesBySerialdefault void stopQueriesBySerial(@NotNull @org.jetbrains.annotations.NotNull long[] querySerials) Stops one or more persistent query by serial id.- Parameters:
- querySerials- the serial ids of the persistent query configurations to be stopped
 
- 
stopQueriesStops one or more persistent queries.- Parameters:
- configs- the persistent query configurations to be stopped
 
- 
stopQueriesBySerialStop the specified queries by serial.- Parameters:
- querySerials- the serials
 
- 
updateQueryStatusvoid updateQueryStatus(long querySerial, String processInfoId, @Nullable @Nullable PersistentQueryStatusEnum status, @Nullable @Nullable Map<String, ExportedObjectInfoMessage> scopeFields, @Nullable @Nullable Map<String, throws IOExceptionString[]> tableGroups) Publish an update for a persistent query. This is intended for use by Interactive Consoles only. Thestatus.scopeFields, andtableGroupsfields may all be omitted. If all three are omitted the message will be treated as a basic heartbeat.- Parameters:
- querySerial- the serial of the query this update is for.
- status- an optional new status
- scopeFields- an optional map of exportable objects
- tableGroups- an optional map of exportable object to ACL groups.
- Throws:
- IOException- if a problem occurs during the update
 
 
-