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 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 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 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 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 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 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 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 SqlEngineException
      Overrides:
      newQueryEngine in class SqlDefaultFactoryMXBean
      Throws:
      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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 SqlDefaultFactoryMXBean
    • isLazyInit

      @ManagedOperation(description="Returns the collection of names of all initialized/constructed static SQL Engine instances.") public boolean isLazyInit()
      Overrides:
      isLazyInit in class 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 SqlDefaultFactoryMXBean
    • getAsyncInitThreads

      @ManagedOperation(description="Returns the indicator the initialization process should be done asynchronously.") public Integer getAsyncInitThreads()
      Overrides:
      getAsyncInitThreads in class 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 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 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 SqlDefaultFactoryMXBean
    • getInitInUsageOrder

      @ManagedOperation(description="Returns the indicator that the most frequently used engines should be initialized preferentially.") public Boolean getInitInUsageOrder()
      Overrides:
      getInitInUsageOrder in class 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 SqlDefaultFactoryMXBean
    • isAsyncInitFinished

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

      @ManagedOperation(description="Returns the result of engines initialization process.") public String getEnginesInitErrors()
      Overrides:
      getEnginesInitErrors in class 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 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 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 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 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 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 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 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 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 SqlDefaultFactoryMXBean
    • loadConfiguration

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

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

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

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

      @ManagedOperation(description="Returns the indicator that the processing cache can be used.") public Boolean getUseProcessingCache()
      Overrides:
      getUseProcessingCache in class 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 SqlDefaultFactoryMXBean
    • getUseDynamicProcessingCache

      @ManagedOperation(description="Returns the indicator that the processing cache can be used dynamically.") public Boolean getUseDynamicProcessingCache()
      Overrides:
      getUseDynamicProcessingCache in class 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 SqlDefaultFactoryMXBean
    • getDoProcessingCacheEngines

      @ManagedOperation(description="Returns the negative processing cache.") public List<String> getDoProcessingCacheEngines()
      Overrides:
      getDoProcessingCacheEngines in class 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 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 SqlDefaultFactoryMXBean
    • getDontProcessingCacheEngines

      @ManagedOperation(description="Returns the negative processing cache.") public List<String> getDontProcessingCacheEngines()
      Overrides:
      getDontProcessingCacheEngines in class 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 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 SqlDefaultFactoryMXBean