Package org.sqlproc.engine.spring.jmx
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 Summary
Constructors Constructor Description SpringEngineFactoryJmx()
-
Method Summary
-
Methods inherited from class org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
setSqlEngineFactory
-
-
-
-
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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
- 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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
getQueryNames
@ManagedOperation(description="Returns the collection of names of all initialized/constructed static SQL Query Engine instances.") public List<String> getQueryNames()
- Overrides:
getQueryNames
in classSqlDefaultFactoryMXBean
-
getQueryDynamicNames
@ManagedOperation(description="Returns the collection of names of all initialized/constructed dynamic SQL Query Engine instances.") public List<String> getQueryDynamicNames()
- Overrides:
getQueryDynamicNames
in classSqlDefaultFactoryMXBean
-
getCrudNames
@ManagedOperation(description="Returns the collection of names of all initialized/constructed static SQL Crud Engine instances.") public List<String> getCrudNames()
- Overrides:
getCrudNames
in classSqlDefaultFactoryMXBean
-
getCrudDynamicNames
@ManagedOperation(description="Returns the collection of names of all initialized/constructed dynamic SQL Crud Engine instances.") public List<String> getCrudDynamicNames()
- Overrides:
getCrudDynamicNames
in classSqlDefaultFactoryMXBean
-
getProcedureNames
@ManagedOperation(description="Returns the collection of names of all initialized/constructed static SQL Procedure Engine instances.") public List<String> getProcedureNames()
- Overrides:
getProcedureNames
in classSqlDefaultFactoryMXBean
-
getProcedureDynamicNames
@ManagedOperation(description="Returns the collection of names of all initialized/constructed dynamic SQL Procedure Engine instances.") public List<String> getProcedureDynamicNames()
- Overrides:
getProcedureDynamicNames
in classSqlDefaultFactoryMXBean
-
getQueryEngineProcessingCache
@ManagedOperation(description="Returns the processing cache used for the selected SQL Query Engine.") public List<String> getQueryEngineProcessingCache(String name)
- Overrides:
getQueryEngineProcessingCache
in classSqlDefaultFactoryMXBean
-
getCrudEngineProcessingCache
@ManagedOperation(description="Returns the processing cache used for the selected SQL CRUD Engine.") public List<String> getCrudEngineProcessingCache(String name)
- Overrides:
getCrudEngineProcessingCache
in classSqlDefaultFactoryMXBean
-
getProcedureEngineProcessingCache
@ManagedOperation(description="Returns the processing cache used for the selected SQL Procedure Engine.") public List<String> getProcedureEngineProcessingCache(String name)
- Overrides:
getProcedureEngineProcessingCache
in classSqlDefaultFactoryMXBean
-
getQueryEngineProcessingCacheStatistics
@ManagedOperation(description="Returns the processing cache statistics used for the selected SQL Query Engine.") public List<String> getQueryEngineProcessingCacheStatistics(String name)
- Overrides:
getQueryEngineProcessingCacheStatistics
in classSqlDefaultFactoryMXBean
-
getCrudEngineProcessingCacheStatistics
@ManagedOperation(description="Returns the processing cache statistics used for the selected SQL CRUD Engine.") public List<String> getCrudEngineProcessingCacheStatistics(String name)
- Overrides:
getCrudEngineProcessingCacheStatistics
in classSqlDefaultFactoryMXBean
-
getProcedureEngineProcessingCacheStatistics
@ManagedOperation(description="Returns the processing cache statistics used for the selected SQL Procedure Engine.") public List<String> getProcedureEngineProcessingCacheStatistics(String name)
- Overrides:
getProcedureEngineProcessingCacheStatistics
in classSqlDefaultFactoryMXBean
-
resetQueryEngineProcessingCache
@ManagedOperation(description="Clears the processing cache used for the selected SQL Query Engine.") public int resetQueryEngineProcessingCache(String name, String names)
- Overrides:
resetQueryEngineProcessingCache
in classSqlDefaultFactoryMXBean
-
resetCrudEngineProcessingCache
@ManagedOperation(description="Clears the processing cache used for the selected SQL CRUD Engine.") public int resetCrudEngineProcessingCache(String name, String names)
- Overrides:
resetCrudEngineProcessingCache
in classSqlDefaultFactoryMXBean
-
resetProcedureEngineProcessingCache
@ManagedOperation(description="Clears the processing cache used for the selected SQL Procedure Engine.") public int resetProcedureEngineProcessingCache(String name, String names)
- Overrides:
resetProcedureEngineProcessingCache
in classSqlDefaultFactoryMXBean
-
isLazyInit
@ManagedOperation(description="Returns the collection of names of all initialized/constructed static SQL Engine instances.") public boolean isLazyInit()
- Overrides:
isLazyInit
in classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
getAsyncInitThreads
@ManagedOperation(description="Returns the indicator the initialization process should be done asynchronously.") public Integer getAsyncInitThreads()
- Overrides:
getAsyncInitThreads
in classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
getInitInUsageOrder
@ManagedOperation(description="Returns the indicator that the most frequently used engines should be initialized preferentially.") public Boolean getInitInUsageOrder()
- Overrides:
getInitInUsageOrder
in classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
isAsyncInitFinished
@ManagedOperation(description="Returns the flag indicating the asynchronous SQL Processor engines initialization has been finished.") public Boolean isAsyncInitFinished()
- Overrides:
isAsyncInitFinished
in classSqlDefaultFactoryMXBean
-
getEnginesInitErrors
@ManagedOperation(description="Returns the result of engines initialization process.") public String getEnginesInitErrors()
- Overrides:
getEnginesInitErrors
in classSqlDefaultFactoryMXBean
-
getQueryEnginesToInit
@ManagedOperation(description="Returns the container of the Query Engines\' names, which has to be initialized.") public List<String> getQueryEnginesToInit()
- Overrides:
getQueryEnginesToInit
in classSqlDefaultFactoryMXBean
-
getCrudEnginesToInit
@ManagedOperation(description="Returns the container of the CRUD Engines\' names, which has to be initialized.") public List<String> getCrudEnginesToInit()
- Overrides:
getCrudEnginesToInit
in classSqlDefaultFactoryMXBean
-
getProcedureEnginesToInit
@ManagedOperation(description="Returns the container of the Procedure Engines\' names, which has to be initialized.") public List<String> getProcedureEnginesToInit()
- Overrides:
getProcedureEnginesToInit
in classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
loadConfiguration
@ManagedOperation(description="Loads the persisted configuration.") public void loadConfiguration()
- Overrides:
loadConfiguration
in classSqlDefaultFactoryMXBean
-
storeConfiguration
@ManagedOperation(description="Persists the configuration into the external file.") public void storeConfiguration()
- Overrides:
storeConfiguration
in classSqlDefaultFactoryMXBean
-
clearConfiguration
@ManagedOperation(description="Resets the state of the dynamic configuration instance.") public void clearConfiguration()
- Overrides:
clearConfiguration
in classSqlDefaultFactoryMXBean
-
clearConfigurationUsage
@ManagedOperation(description="Reset the engines\' usage counters.") public void clearConfigurationUsage()
- Overrides:
clearConfigurationUsage
in classSqlDefaultFactoryMXBean
-
getUseProcessingCache
@ManagedOperation(description="Returns the indicator that the processing cache can be used.") public Boolean getUseProcessingCache()
- Overrides:
getUseProcessingCache
in classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
getUseDynamicProcessingCache
@ManagedOperation(description="Returns the indicator that the processing cache can be used dynamically.") public Boolean getUseDynamicProcessingCache()
- Overrides:
getUseDynamicProcessingCache
in classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
getDoProcessingCacheEngines
@ManagedOperation(description="Returns the negative processing cache.") public List<String> getDoProcessingCacheEngines()
- Overrides:
getDoProcessingCacheEngines
in classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
getDontProcessingCacheEngines
@ManagedOperation(description="Returns the negative processing cache.") public List<String> getDontProcessingCacheEngines()
- Overrides:
getDontProcessingCacheEngines
in classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
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 classSqlDefaultFactoryMXBean
-
-