Class PersistentQueryTableHelper
java.lang.Object
com.illumon.iris.controller.utils.PersistentQueryTableHelper
- Direct Known Subclasses:
WeepsPreemptiveTableHelper
public class PersistentQueryTableHelper extends Object
Given the name or config serial ID of a persistent query, connect to it and fetch a preemptive table by name.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PersistentQueryTableHelper.HelperPersistentQueryClient
A wrapper around aPersistentQueryClient
that retrieves and subscribes to preemptive tables. -
Constructor Summary
Constructors Constructor Description PersistentQueryTableHelper()
-
Method Summary
Modifier and Type Method Description static PersistentQueryTableHelper.HelperPersistentQueryClient
getClientForPersistentQuery(com.fishlib.io.logger.Logger log, long configSerial, long timeoutMillis)
Create aPersistentQueryTableHelper.HelperPersistentQueryClient
for the specified persistent query.static PersistentQueryTableHelper.HelperPersistentQueryClient
getClientForPersistentQuery(com.fishlib.io.logger.Logger log, String owner, String name, long timeoutMillis)
Create aPersistentQueryTableHelper.HelperPersistentQueryClient
for the specified persistent query.static Table
getPreemptiveTableFromPersistentQuery(com.fishlib.io.logger.Logger log, long configSerial, String tableName)
Subscribe to the named table for the specified persistent query.static Table
getPreemptiveTableFromPersistentQuery(com.fishlib.io.logger.Logger log, String owner, String name, String tableName)
Subscribe to the named table for the specified persistent query.static Table
getPreemptiveTableFromPersistentQuery(PersistentQueryTableHelper.HelperPersistentQueryClient helper, String tableName)
Subscribe to the named table using the provided helper.
-
Constructor Details
-
PersistentQueryTableHelper
public PersistentQueryTableHelper()
-
-
Method Details
-
getClientForPersistentQuery
public static PersistentQueryTableHelper.HelperPersistentQueryClient getClientForPersistentQuery(com.fishlib.io.logger.Logger log, long configSerial, long timeoutMillis)Create aPersistentQueryTableHelper.HelperPersistentQueryClient
for the specified persistent query.- Parameters:
log
- the logger object for informational and error messagesconfigSerial
- the serial number of the query to connect totimeoutMillis
- how many milliseconds to wait for the query to be running- Returns:
- a HelperPersistentQueryClient for the given query.
-
getClientForPersistentQuery
public static PersistentQueryTableHelper.HelperPersistentQueryClient getClientForPersistentQuery(com.fishlib.io.logger.Logger log, String owner, String name, long timeoutMillis)Create aPersistentQueryTableHelper.HelperPersistentQueryClient
for the specified persistent query.- Parameters:
log
- the logger object for informational and error messagesowner
- the owner of the persistent queryname
- the name of the persistent querytimeoutMillis
- how many milliseconds to wait for the query to be running- Returns:
- a HelperPersistentQueryClient for the given query.
-
getPreemptiveTableFromPersistentQuery
public static Table getPreemptiveTableFromPersistentQuery(PersistentQueryTableHelper.HelperPersistentQueryClient helper, String tableName)Subscribe to the named table using the provided helper.- Parameters:
helper
- the helper for the persistent querytableName
- the name of the table within the persistent query's binding- Returns:
- a local updating copy of the remote table
-
getPreemptiveTableFromPersistentQuery
public static Table getPreemptiveTableFromPersistentQuery(com.fishlib.io.logger.Logger log, long configSerial, String tableName)Subscribe to the named table for the specified persistent query.- Parameters:
log
- the logger object for informational and error messagesconfigSerial
- the serial number of the query to connect totableName
- the name of the table within the persistent query's binding- Returns:
- a local updating copy of the remote table
-
getPreemptiveTableFromPersistentQuery
public static Table getPreemptiveTableFromPersistentQuery(com.fishlib.io.logger.Logger log, String owner, String name, String tableName)Subscribe to the named table for the specified persistent query.- Parameters:
log
- the logger object for informational and error messagesowner
- the owner of the persistent queryname
- the name of the persistent querytableName
- the name of the table within the persistent query's binding- Returns:
- a local updating copy of the remote table
-