Class 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 Detail

      • SpringEngineFactoryJmx

        public SpringEngineFactoryJmx()
    • Method Detail

      • 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
      • 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
      • 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
      • 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
      • clearConfiguration

        @ManagedOperation(description="Resets the state of the dynamic configuration instance.")
        public void clearConfiguration()
        Overrides:
        clearConfiguration 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
      • 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
      • 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
      • 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