Class SpringEngineFactoryJmx

java.lang.Object
org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
org.sqlproc.engine.spring.jmx.SpringEngineFactoryJmx

@ManagedResource(objectName="sql-processor:type=Engine", description="The simplified JMX interface for the SQL Engine factory.") public class SpringEngineFactoryJmx extends org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
The implementation of the simplified JMX interface for the SQL Engine factory.

The factory can be based on Spring DI framework for example.

For more info please see the Tutorials.

Author:
Vladimir Hudec
  • Constructor Details

    • SpringEngineFactoryJmx

      public SpringEngineFactoryJmx()
  • Method Details

    • initQueryEngines

      @ManagedOperation(description="In the case the SQL Query Engines are not initialized, a new static instances are established in the cache.") @ManagedOperationParameters(@ManagedOperationParameter(name="names",description="The names of the required SQL Query Engines instances")) public int initQueryEngines(String names)
      Overrides:
      initQueryEngines in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • initCrudEngines

      @ManagedOperation(description="In the case the SQL CRUD Engines are not initialized, a new static instances are established in the cache.") @ManagedOperationParameters(@ManagedOperationParameter(name="names",description="The names of the required SQL CRUD Engines instances")) public int initCrudEngines(String names)
      Overrides:
      initCrudEngines in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • initProcedureEngines

      @ManagedOperation(description="In the case the SQL Procedure Engines are not initialized, a new static instances are established in the cache.") @ManagedOperationParameters(@ManagedOperationParameter(name="names",description="The names of the required SQL Procedure Engines instances")) public int initProcedureEngines(String names)
      Overrides:
      initProcedureEngines in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • resetQueryEngines

      @ManagedOperation(description="In the case any dynamic SQL Query Engine is in the cache, the static one is re-established.") @ManagedOperationParameters(@ManagedOperationParameter(name="names",description="The names of the required SQL Query Engines instances")) public int resetQueryEngines(String names)
      Overrides:
      resetQueryEngines in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • resetCrudEngines

      @ManagedOperation(description="In the case any dynamic SQL CRUD Engine is in the cache, the static one is re-established.") @ManagedOperationParameters(@ManagedOperationParameter(name="names",description="The names of the required SQL CRUD Engines instances")) public int resetCrudEngines(String names)
      Overrides:
      resetCrudEngines in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • resetProcedureEngines

      @ManagedOperation(description="In the case any dynamic SQL Procedure Engine is in the cache, the static one is re-established.") @ManagedOperationParameters(@ManagedOperationParameter(name="names",description="The names of the required SQL Procedure Engines instances")) public int resetProcedureEngines(String names)
      Overrides:
      resetProcedureEngines in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • newQueryEngine

      @ManagedOperation(description="A new dynamic SQL Query Engine instance is established in the cache. The static one is suppressed.") @ManagedOperationParameter(name="name",description="The name of the required SQL Query Engine instances") @ManagedOperationParameter(name="sqlStatement",description="The new SQL statement, which is going to replace the original one") public void newQueryEngine(String name, String sqlStatement) throws org.sqlproc.engine.SqlEngineException
      Overrides:
      newQueryEngine in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
      Throws:
      org.sqlproc.engine.SqlEngineException
    • newCrudEngine

      @ManagedOperation(description="A new dynamic SQL CRUD Engine instance is established in the cache. The static one is suppressed.") @ManagedOperationParameter(name="name",description="The name of the required SQL CRUD Engine instances") @ManagedOperationParameter(name="sqlStatement",description="The new SQL statement, which is going to replace the original one") public void newCrudEngine(String name, String sqlStatement)
      Overrides:
      newCrudEngine in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • newProcedureEngine

      @ManagedOperation(description="A new dynamic SQL Procedure Engine instance is established in the cache. The static one is suppressed.") @ManagedOperationParameter(name="name",description="The name of the required Procedure Query Engine instances") @ManagedOperationParameter(name="sqlStatement",description="The new SQL statement, which is going to replace the original one") public void newProcedureEngine(String name, String sqlStatement)
      Overrides:
      newProcedureEngine in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getQueryNames

      @ManagedOperation(description="Returns the collection of names of all initialized/constructed static SQL Query Engine instances.") public List<String> getQueryNames()
      Overrides:
      getQueryNames in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getQueryDynamicNames

      @ManagedOperation(description="Returns the collection of names of all initialized/constructed dynamic SQL Query Engine instances.") public List<String> getQueryDynamicNames()
      Overrides:
      getQueryDynamicNames in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getCrudNames

      @ManagedOperation(description="Returns the collection of names of all initialized/constructed static SQL Crud Engine instances.") public List<String> getCrudNames()
      Overrides:
      getCrudNames in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getCrudDynamicNames

      @ManagedOperation(description="Returns the collection of names of all initialized/constructed dynamic SQL Crud Engine instances.") public List<String> getCrudDynamicNames()
      Overrides:
      getCrudDynamicNames in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getProcedureNames

      @ManagedOperation(description="Returns the collection of names of all initialized/constructed static SQL Procedure Engine instances.") public List<String> getProcedureNames()
      Overrides:
      getProcedureNames in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getProcedureDynamicNames

      @ManagedOperation(description="Returns the collection of names of all initialized/constructed dynamic SQL Procedure Engine instances.") public List<String> getProcedureDynamicNames()
      Overrides:
      getProcedureDynamicNames in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getQueryEngineProcessingCache

      @ManagedOperation(description="Returns the processing cache used for the selected SQL Query Engine.") public List<String> getQueryEngineProcessingCache(String name)
      Overrides:
      getQueryEngineProcessingCache in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getCrudEngineProcessingCache

      @ManagedOperation(description="Returns the processing cache used for the selected SQL CRUD Engine.") public List<String> getCrudEngineProcessingCache(String name)
      Overrides:
      getCrudEngineProcessingCache in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getProcedureEngineProcessingCache

      @ManagedOperation(description="Returns the processing cache used for the selected SQL Procedure Engine.") public List<String> getProcedureEngineProcessingCache(String name)
      Overrides:
      getProcedureEngineProcessingCache in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getQueryEngineProcessingCacheStatistics

      @ManagedOperation(description="Returns the processing cache statistics used for the selected SQL Query Engine.") public List<String> getQueryEngineProcessingCacheStatistics(String name)
      Overrides:
      getQueryEngineProcessingCacheStatistics in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getCrudEngineProcessingCacheStatistics

      @ManagedOperation(description="Returns the processing cache statistics used for the selected SQL CRUD Engine.") public List<String> getCrudEngineProcessingCacheStatistics(String name)
      Overrides:
      getCrudEngineProcessingCacheStatistics in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getProcedureEngineProcessingCacheStatistics

      @ManagedOperation(description="Returns the processing cache statistics used for the selected SQL Procedure Engine.") public List<String> getProcedureEngineProcessingCacheStatistics(String name)
      Overrides:
      getProcedureEngineProcessingCacheStatistics in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • resetQueryEngineProcessingCache

      @ManagedOperation(description="Clears the processing cache used for the selected SQL Query Engine.") public int resetQueryEngineProcessingCache(String name, String names)
      Overrides:
      resetQueryEngineProcessingCache in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • resetCrudEngineProcessingCache

      @ManagedOperation(description="Clears the processing cache used for the selected SQL CRUD Engine.") public int resetCrudEngineProcessingCache(String name, String names)
      Overrides:
      resetCrudEngineProcessingCache in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • resetProcedureEngineProcessingCache

      @ManagedOperation(description="Clears the processing cache used for the selected SQL Procedure Engine.") public int resetProcedureEngineProcessingCache(String name, String names)
      Overrides:
      resetProcedureEngineProcessingCache in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • isLazyInit

      @ManagedOperation(description="Returns the collection of names of all initialized/constructed static SQL Engine instances.") public boolean isLazyInit()
      Overrides:
      isLazyInit in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • setLazyInit

      @ManagedOperation(description="Sets the indicator to speed up the initialization process.") @ManagedOperationParameters(@ManagedOperationParameter(name="lazyInit",description="The indicator to speed up the initialization process.")) public void setLazyInit(boolean lazyInit)
      Overrides:
      setLazyInit in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getAsyncInitThreads

      @ManagedOperation(description="Returns the indicator the initialization process should be done asynchronously.") public Integer getAsyncInitThreads()
      Overrides:
      getAsyncInitThreads in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • setAsyncInitThreads

      @ManagedOperation(description="Sets the number of threads used for asynchronous initialization") @ManagedOperationParameters(@ManagedOperationParameter(name="asyncInitThreads",description="The number of threads used for asynchronous initialization.")) public void setAsyncInitThreads(Integer asyncInitThreads)
      Overrides:
      setAsyncInitThreads in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getInitTreshold

      @ManagedOperation(description="Returns the initialization threshold. The engines, which usage is at least this number should be initialized directly.") public Integer getInitTreshold()
      Overrides:
      getInitTreshold in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • setInitTreshold

      @ManagedOperation(description="Sets the initialization threshold. The engines, which usage is at least this number should be initialized directly.") @ManagedOperationParameters(@ManagedOperationParameter(name="initTreshold",description="The initialization threshold.")) public void setInitTreshold(Integer initTreshold)
      Overrides:
      setInitTreshold in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getInitInUsageOrder

      @ManagedOperation(description="Returns the indicator that the most frequently used engines should be initialized preferentially.") public Boolean getInitInUsageOrder()
      Overrides:
      getInitInUsageOrder in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • setInitInUsageOrder

      @ManagedOperation(description="Sets the indicator that the most frequently used engines should be initialized preferentially.") @ManagedOperationParameters(@ManagedOperationParameter(name="initTreshold",description="The indicator value.")) public void setInitInUsageOrder(Boolean initInUsageOrder)
      Overrides:
      setInitInUsageOrder in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • isAsyncInitFinished

      @ManagedOperation(description="Returns the flag indicating the asynchronous SQL Processor engines initialization has been finished.") public Boolean isAsyncInitFinished()
      Overrides:
      isAsyncInitFinished in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getEnginesInitErrors

      @ManagedOperation(description="Returns the result of engines initialization process.") public String getEnginesInitErrors()
      Overrides:
      getEnginesInitErrors in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getQueryEnginesToInit

      @ManagedOperation(description="Returns the container of the Query Engines' names, which has to be initialized.") public List<String> getQueryEnginesToInit()
      Overrides:
      getQueryEnginesToInit in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getCrudEnginesToInit

      @ManagedOperation(description="Returns the container of the CRUD Engines' names, which has to be initialized.") public List<String> getCrudEnginesToInit()
      Overrides:
      getCrudEnginesToInit in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getProcedureEnginesToInit

      @ManagedOperation(description="Returns the container of the Procedure Engines' names, which has to be initialized.") public List<String> getProcedureEnginesToInit()
      Overrides:
      getProcedureEnginesToInit in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getQueryEngineUsage

      @ManagedOperation(description="Returns the Query Engine usage number.") @ManagedOperationParameters(@ManagedOperationParameter(name="name",description="The name of the SQL Query Engine")) public int getQueryEngineUsage(String name)
      Overrides:
      getQueryEngineUsage in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getCrudEngineUsage

      @ManagedOperation(description="Returns the CRUD Engine usage number.") @ManagedOperationParameters(@ManagedOperationParameter(name="name",description="The name of the SQL CRUD Engine")) public int getCrudEngineUsage(String name)
      Overrides:
      getCrudEngineUsage in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getProcedureEngineUsage

      @ManagedOperation(description="Returns the Procedure Engine usage number.") @ManagedOperationParameters(@ManagedOperationParameter(name="name",description="The name of the SQL Procedure Engine")) public int getProcedureEngineUsage(String name)
      Overrides:
      getProcedureEngineUsage in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • resetQueryEngineUsage

      @ManagedOperation(description="Resets the Query Engine usage number.") @ManagedOperationParameters(@ManagedOperationParameter(name="name",description="The name of the SQL Query Engine")) public int resetQueryEngineUsage(String name)
      Overrides:
      resetQueryEngineUsage in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • resetCrudEngineUsage

      @ManagedOperation(description="Resets the CRUD Engine usage number.") @ManagedOperationParameters(@ManagedOperationParameter(name="name",description="The name of the SQL CRUD Engine")) public int resetCrudEngineUsage(String name)
      Overrides:
      resetCrudEngineUsage in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • resetProcedureEngineUsage

      @ManagedOperation(description="Resets the Procedure Engine usage number.") @ManagedOperationParameters(@ManagedOperationParameter(name="name",description="The name of the SQL Procedure Engine")) public int resetProcedureEngineUsage(String name)
      Overrides:
      resetProcedureEngineUsage in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • loadConfiguration

      @ManagedOperation(description="Loads the persisted configuration.") public void loadConfiguration()
      Overrides:
      loadConfiguration in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • storeConfiguration

      @ManagedOperation(description="Persists the configuration into the external file.") public void storeConfiguration()
      Overrides:
      storeConfiguration in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • clearConfiguration

      @ManagedOperation(description="Resets the state of the dynamic configuration instance.") public void clearConfiguration()
      Overrides:
      clearConfiguration in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • clearConfigurationUsage

      @ManagedOperation(description="Reset the engines' usage counters.") public void clearConfigurationUsage()
      Overrides:
      clearConfigurationUsage in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getUseProcessingCache

      @ManagedOperation(description="Returns the indicator that the processing cache can be used.") public Boolean getUseProcessingCache()
      Overrides:
      getUseProcessingCache in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • setUseProcessingCache

      @ManagedOperation(description="Sets the indicator that the processing cache can be used.") @ManagedOperationParameters(@ManagedOperationParameter(name="useProcessingCache",description="The indicator that the processing cache can be used")) public void setUseProcessingCache(Boolean useProcessingCache)
      Overrides:
      setUseProcessingCache in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getUseDynamicProcessingCache

      @ManagedOperation(description="Returns the indicator that the processing cache can be used dynamically.") public Boolean getUseDynamicProcessingCache()
      Overrides:
      getUseDynamicProcessingCache in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • setUseDynamicProcessingCache

      @ManagedOperation(description="Sets the indicator that the processing cache can be used dynamically.") @ManagedOperationParameters(@ManagedOperationParameter(name="useDynamicProcessingCache",description="The indicator that the processing cache can be used dynamically")) public void setUseDynamicProcessingCache(Boolean useDynamicProcessingCache)
      Overrides:
      setUseDynamicProcessingCache in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getDoProcessingCacheEngines

      @ManagedOperation(description="Returns the negative processing cache.") public List<String> getDoProcessingCacheEngines()
      Overrides:
      getDoProcessingCacheEngines in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • initDoProcessingCache

      @ManagedOperation(description="Updates the positive processing cache.") @ManagedOperationParameters(@ManagedOperationParameter(name="names",description="The names of the SQL Query Engines instances")) public int initDoProcessingCache(String names)
      Overrides:
      initDoProcessingCache in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • resetDoProcessingCache

      @ManagedOperation(description="Updates the positive processing cache.") @ManagedOperationParameters(@ManagedOperationParameter(name="names",description="The names of the SQL Query Engines instances")) public int resetDoProcessingCache(String names)
      Overrides:
      resetDoProcessingCache in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • getDontProcessingCacheEngines

      @ManagedOperation(description="Returns the negative processing cache.") public List<String> getDontProcessingCacheEngines()
      Overrides:
      getDontProcessingCacheEngines in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • initDontProcessingCache

      @ManagedOperation(description="Updates the negative processing cache.") @ManagedOperationParameters(@ManagedOperationParameter(name="names",description="The names of the SQL Query Engines instances")) public int initDontProcessingCache(String names)
      Overrides:
      initDontProcessingCache in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
    • resetDontProcessingCache

      @ManagedOperation(description="Updates the negative processing cache.") @ManagedOperationParameters(@ManagedOperationParameter(name="names",description="The names of the SQL Query Engines instances")) public int resetDontProcessingCache(String names)
      Overrides:
      resetDontProcessingCache in class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean