java.lang.Object
com.inductiveautomation.factorypmi.application.gateway.QueryManager
All Implemented Interfaces:
GatewayConstants

public class QueryManager extends Object implements GatewayConstants
  • Method Details

    • getInstance

      public static QueryManager getInstance()
    • createInstance

      public static void createInstance(int numWorkers, int numUpdaters)
    • stop

      public void stop()
    • getActiveThreads

      public int getActiveThreads()
    • getQueryCount

      public int getQueryCount()
    • printReport

      public void printReport()
    • runUpdateQuery

      public void runUpdateQuery(IQueryResponseListener adapter, String query, String datasource)
    • runUpdateQuery

      public void runUpdateQuery(IQueryResponseListener adapter, IQuery query)
    • registerQuery

      public Object registerQuery(IQuery query, IQueryResponseListener listener, Class targetType, int updateRate, boolean runOnce, boolean notifyLoading)
      Registers a new query to be run, either periodically or once. This "query" is an implementation of IQuery - anything that can retrieve a Dataset from the gateway.
      Parameters:
      targetType - The data type that will be pushed into the query response listener. Use Dataset.class to leave the IQuery's resulting dataset untouched. Use a scalar type to coerce the 1st value.
      updateRate - The rate (actually a delay) at which to run the query.
      runOnce - If true, the query will only be run once, regardless of the update rate
      notifyLoading - Controls whether or not the response listener will be notified when this query is running.
    • unregisterQuery

      public void unregisterQuery(Object key)
    • setPaused

      public void setPaused(boolean paused)