Package org.sqlproc.engine.jmx
Class SqlDefaultFactoryMXBean
java.lang.Object
org.sqlproc.engine.jmx.SqlDefaultFactoryMXBean
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
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidResets the state of the dynamic configuration instance.voidReset the engines' usage counters.Returns the number of threads used for asynchronous initializationprivate SqlEngineConfigurationReturns the dynamic SQL Processor configuration ant checks it's not nullReturns the collection of names of all initialized/constructed dynamic SQL CRUD Engine instances.Returns the processing cache used for the selected SQL CRUD EngineReturns the processing cache statistics used for the selected SQL CRUD EngineReturns the container of the CRUD Engines' names, which has to be initialized.intgetCrudEngineUsage(String name) Returns the CRUD Engine usage number.Returns the collection of names of all initialized/constructed static SQL CRUD Engine instances.Returns the list of engines, for which the processing cache can't be usedReturns the list of engines, for which the processing cache can be usedReturns the result of engines initialization process.Returns the indicator that the most frequently used engines should be initialized preferentiallyReturns the initialization threshold.Returns the collection of names of all initialized/constructed dynamic SQL ProcedureEngine instances.Returns the processing cache used for the selected SQL Procedure EngineReturns the processing cache statistics used for the selected SQL Procedure EngineReturns the container of the Procedure Engines' names, which has to be initialized.intReturns the Procedure Engine usage number.Returns the collection of names of all initialized/constructed static SQL ProcedureEngine instances.Returns the collection of names of all initialized/constructed dynamic SQL Query Engine instances.Returns the processing cache used for the selected SQL Query EngineReturns the processing cache statistics used for the selected SQL Query EngineReturns the container of the Query Engines' names, which has to be initialized.intgetQueryEngineUsage(String name) Returns the Query Engine usage number.Returns the collection of names of all initialized/constructed static SQL Query Engine instances.Returns the indicator that the processing cache can be used dynamicallyReturns the indicator that the processing cache can be usedintinitCrudEngines(String names) In the case the SQL CRUD Engines are not initialized, a new static instances are established in the cache.intinitDontProcessingCache(String names) Updates the negative processing cache.intinitDoProcessingCache(String names) Updates the positive processing cache.intinitProcedureEngines(String names) In the case the SQL Procedure Engines are not initialized, a new static instances are established in the cache.intinitQueryEngines(String names) In the case the SQL Query Engines are not initialized, a new static instances are established in the cache.Returns the flag indicating the asynchronous SQL Processor engines initialization has been finished.booleanReturns the indicator to speed up the initialization processvoidLoads the persisted configuration.voidnewCrudEngine(String name, String sqlStatement) A new dynamic SQL CRUD Engine instance is established in the cache.voidnewProcedureEngine(String name, String sqlStatement) A new dynamic SQL Procedure Engine instance is established in the cache.voidnewQueryEngine(String name, String sqlStatement) A new dynamic SQL Query Engine instance is established in the cache.intresetCrudEngineProcessingCache(String name, String names) Clears the processing cache used for the selected SQL CRUD EngineintresetCrudEngines(String names) In the case any dynamic SQL CRUD Engine is in the cache, the static one is re-established.intresetCrudEngineUsage(String name) Resets the CRUD Engine usage number.intresetDontProcessingCache(String names) Updates the negative processing cache.intresetDoProcessingCache(String names) Updates the positive processing cache.intresetProcedureEngineProcessingCache(String name, String names) Clears the processing cache used for the selected SQL Procedure EngineintresetProcedureEngines(String names) In the case a dynamic SQL Procedure Engine is in the cache, the static one is re-established.intResets the Procedure Engine usage number.intresetQueryEngineProcessingCache(String name, String names) Clears the processing cache used for the selected SQL Query EngineintresetQueryEngines(String names) In the case any dynamic SQL Query Engine is in the cache, the static one is re-established.intresetQueryEngineUsage(String name) Resets the Query Engine usage number.voidsetAsyncInitThreads(Integer asyncInitThreads) Sets the number of threads used for asynchronous initializationvoidsetInitInUsageOrder(Boolean initInUsageOrder) Sets the indicator that the most frequently used engines should be initialized preferentiallyvoidsetInitTreshold(Integer initTreshold) Sets the initialization threshold.voidsetLazyInit(boolean lazyInit) Sets the indicator to speed up the initialization processvoidsetSqlEngineFactory(SqlEngineFactory sqlEngineFactory) Sets the SQL Engine factory instancevoidsetUseDynamicProcessingCache(Boolean useDynamicProcessingCache) Sets the indicator that the processing cache can be used dynamicallyvoidsetUseProcessingCache(Boolean useProcessingCache) Sets the indicator that the processing cache can be usedvoidPersists the configuration into the external file.Converts list
-
Field Details
-
sqlEngineFactory
The SQL Engine factory instance
-
-
Constructor Details
-
SqlDefaultFactoryMXBean
public SqlDefaultFactoryMXBean()
-
-
Method Details
-
initQueryEngines
In the case the SQL Query Engines are not initialized, a new static instances are established in the cache.- Parameters:
names- the names of the required SQL Query Engines instances- Returns:
- the number of successfully initialized engines
-
initCrudEngines
In the case the SQL CRUD Engines are not initialized, a new static instances are established in the cache.- Parameters:
names- the names of the required SQL CRUD Engines instances- Returns:
- the number of successfully initialized engines
-
initProcedureEngines
In the case the SQL Procedure Engines are not initialized, a new static instances are established in the cache.- Parameters:
names- the names of the required SQL Procedure Engines instances- Returns:
- the number of successfully initialized engines
-
resetQueryEngines
In the case any dynamic SQL Query Engine is in the cache, the static one is re-established.- Parameters:
names- the names of the required SQL Query Engines instances- Returns:
- the number of successfully reset engines
-
resetCrudEngines
In the case any dynamic SQL CRUD Engine is in the cache, the static one is re-established.- Parameters:
names- the names of the required SQL CRUD Engines instances- Returns:
- the number of successfully reset engines
-
resetProcedureEngines
In the case a dynamic SQL Procedure Engine is in the cache, the static one is re-established.- Parameters:
names- the names of the required SQL Procedure Engines instances- Returns:
- the number of successfully reset engines
-
newQueryEngine
A new dynamic SQL Query Engine instance is established in the cache. The static one is suppressed.- Parameters:
name- the name of the required SQL Query Engine instancesqlStatement- the new SQL statement, which is going to replace the original one- Throws:
SqlEngineException
-
newCrudEngine
A new dynamic SQL CRUD Engine instance is established in the cache. The static one is suppressed.- Parameters:
name- the name of the required SQL CRUD Engine instancesqlStatement- the new SQL statement, which is going to replace the original one
-
newProcedureEngine
A new dynamic SQL Procedure Engine instance is established in the cache. The static one is suppressed.- Parameters:
name- the name of the required SQL Procedure Engine instancesqlStatement- the new SQL statement, which is going to replace the original one
-
getQueryNames
Returns the collection of names of all initialized/constructed static SQL Query Engine instances.- Returns:
- The collection of all initialized static SQL Query Engine instances' names
-
getQueryDynamicNames
Returns the collection of names of all initialized/constructed dynamic SQL Query Engine instances.- Returns:
- The collection of all initialized dynamic SQL Query Engine instances' names
-
getCrudNames
Returns the collection of names of all initialized/constructed static SQL CRUD Engine instances.- Returns:
- The collection of all initialized static SQL CRUD Engine instances' names
-
getCrudDynamicNames
Returns the collection of names of all initialized/constructed dynamic SQL CRUD Engine instances.- Returns:
- The collection of all initialized dynamic SQL CRUD Engine instances' names
-
getProcedureNames
Returns the collection of names of all initialized/constructed static SQL ProcedureEngine instances.- Returns:
- The collection of all initialized static SQL ProcedureEngine instances' names
-
getProcedureDynamicNames
Returns the collection of names of all initialized/constructed dynamic SQL ProcedureEngine instances.- Returns:
- The collection of all initialized dynamic SQL ProcedureEngine instances' names
-
getQueryEngineProcessingCache
Returns the processing cache used for the selected SQL Query Engine- Parameters:
name- the name of the required SQL Query Engine- Returns:
- the processing cache used for the selected SQL Query Engine or the error message
-
getCrudEngineProcessingCache
Returns the processing cache used for the selected SQL CRUD Engine- Parameters:
name- the name of the required SQL CRUD Engine- Returns:
- the processing cache used for the selected SQL CRUD Engine or the error message
-
getProcedureEngineProcessingCache
Returns the processing cache used for the selected SQL Procedure Engine- Parameters:
name- the name of the required SQL Procedure Engine- Returns:
- the processing cache used for the selected SQL Procedure Engine or the error message
-
getQueryEngineProcessingCacheStatistics
Returns the processing cache statistics used for the selected SQL Query Engine- Parameters:
name- the name of the required SQL Query Engine- Returns:
- the processing cache statistics used for the selected SQL Query Engine or the error message
-
getCrudEngineProcessingCacheStatistics
Returns the processing cache statistics used for the selected SQL CRUD Engine- Parameters:
name- the name of the required SQL CRUD Engine- Returns:
- the processing cache statistics used for the selected SQL CRUD Engine or the error message
-
getProcedureEngineProcessingCacheStatistics
Returns the processing cache statistics used for the selected SQL Procedure Engine- Parameters:
name- the name of the required SQL Procedure Engine- Returns:
- the processing cache statistics used for the selected SQL Procedure Engine or the error message
-
resetQueryEngineProcessingCache
Clears the processing cache used for the selected SQL Query Engine- Parameters:
name- the name of the required SQL Query Enginenames- the names of the processing cache entries to be cleared- Returns:
- the number of successfully reset engine cache entries
-
resetCrudEngineProcessingCache
Clears the processing cache used for the selected SQL CRUD Engine- Parameters:
name- the name of the required SQL CRUD Enginenames- the names of the processing cache entries to be cleared- Returns:
- the number of successfully reset engine cache entries
-
resetProcedureEngineProcessingCache
Clears the processing cache used for the selected SQL Procedure Engine- Parameters:
name- the name of the required SQL Procedure Enginenames- the names of the processing cache entries to be cleared- Returns:
- the number of successfully reset engine cache entries
-
getConfiguration
Returns the dynamic SQL Processor configuration ant checks it's not null- Returns:
- the dynamic SQL Processor configuration
-
isLazyInit
public boolean isLazyInit()Returns the indicator to speed up the initialization process- Returns:
- the indicator to speed up the initialization process
-
setLazyInit
public void setLazyInit(boolean lazyInit) Sets the indicator to speed up the initialization process- Parameters:
lazyInit- the indicator to speed up the initialization process
-
getAsyncInitThreads
Returns the number of threads used for asynchronous initialization- Returns:
- the number of threads used for asynchronous initialization
-
setAsyncInitThreads
Sets the number of threads used for asynchronous initialization- Parameters:
asyncInitThreads- the number of threads used for asynchronous initialization
-
getInitTreshold
Returns the initialization threshold. The engines, which usage is at least this number should be initialized directly- Returns:
- the initialization threshold. The engines, which usage is at least this number should be initialized directly
-
setInitTreshold
Sets the initialization threshold. The engines, which usage is at least this number should be initialized directly- Parameters:
initTreshold- the initialization threshold. The engines, which usage is at least this number should be initialized directly
-
getInitInUsageOrder
Returns the indicator that the most frequently used engines should be initialized preferentially- Returns:
- the indicator that the most frequently used engines should be initialized preferentially
-
setInitInUsageOrder
Sets the indicator that the most frequently used engines should be initialized preferentially- Parameters:
initInUsageOrder- the indicator that the most frequently used engines should be initialized preferentially
-
isAsyncInitFinished
Returns the flag indicating the asynchronous SQL Processor engines initialization has been finished.- Returns:
- the flag indicating the asynchronous SQL Processor engines initialization has been finished
-
getEnginesInitErrors
Returns the result of engines initialization process. For every engine, for which there's error in the initialization process there a error message. In the case there's no error, the result message is null.- Returns:
- the result of engines initialization process
-
loadConfiguration
public void loadConfiguration()Loads the persisted configuration. -
storeConfiguration
public void storeConfiguration()Persists the configuration into the external file. -
clearConfiguration
public void clearConfiguration()Resets the state of the dynamic configuration instance. -
clearConfigurationUsage
public void clearConfigurationUsage()Reset the engines' usage counters. -
toList
Converts list- Parameters:
map- the input list- Returns:
- the output list
-
getQueryEnginesToInit
Returns the container of the Query Engines' names, which has to be initialized. This is called during The SQL Processor initialization, so there's no need to handle concurrent changes.- Returns:
- the container of the Query Engines' names, which has to be initialized
-
getCrudEnginesToInit
Returns the container of the CRUD Engines' names, which has to be initialized. This is called during The SQL Processor initialization, so there's no need to handle concurrent changes.- Returns:
- the container of the CRUD Engines' names, which has to be initialized
-
getProcedureEnginesToInit
Returns the container of the Procedure Engines' names, which has to be initialized. This is called during The SQL Processor initialization, so there's no need to handle concurrent changes.- Returns:
- the container of the Procedure Engines' names, which has to be initialized
-
getQueryEngineUsage
Returns the Query Engine usage number.- Parameters:
name- the name of the SQL Query Engine- Returns:
- the Query Engine usage number
-
getCrudEngineUsage
Returns the CRUD Engine usage number.- Parameters:
name- the name of the SQL CRUD Engine- Returns:
- the CRUD Engine usage number
-
getProcedureEngineUsage
Returns the Procedure Engine usage number.- Parameters:
name- the name of the SQL Procedure Engine- Returns:
- the Procedure Engine usage number
-
resetQueryEngineUsage
Resets the Query Engine usage number.- Parameters:
name- the name of the SQL Query Engine- Returns:
- the Query Engine usage number
-
resetCrudEngineUsage
Resets the CRUD Engine usage number.- Parameters:
name- the name of the SQL CRUD Engine- Returns:
- the CRUD Engine usage number
-
resetProcedureEngineUsage
Resets the Procedure Engine usage number.- Parameters:
name- the name of the SQL Procedure Engine- Returns:
- the Procedure Engine usage number
-
getUseProcessingCache
Returns the indicator that the processing cache can be used- Returns:
- the indicator that the processing cache can be used
-
setUseProcessingCache
Sets the indicator that the processing cache can be used- Parameters:
useProcessingCache- the indicator that the processing cache can be used
-
getUseDynamicProcessingCache
Returns the indicator that the processing cache can be used dynamically- Returns:
- the indicator that the processing cache can be used dynamically
-
setUseDynamicProcessingCache
Sets the indicator that the processing cache can be used dynamically- Parameters:
useDynamicProcessingCache- the indicator that the processing cache can be used dynamically
-
getDoProcessingCacheEngines
Returns the list of engines, for which the processing cache can be used- Returns:
- the list of engines, for which the processing cache can be used
-
initDoProcessingCache
Updates the positive processing cache.- Parameters:
names- the names of the required SQL Query Engines instances- Returns:
- the number of successfully engines added to positive processing cache
-
resetDoProcessingCache
Updates the positive processing cache.- Parameters:
names- the names of the required SQL Query Engines instances to be removed- Returns:
- the number of successfully engines removed from positive processing cache
-
getDontProcessingCacheEngines
Returns the list of engines, for which the processing cache can't be used- Returns:
- the list of engines, for which the processing cache can't be used
-
initDontProcessingCache
Updates the negative processing cache.- Parameters:
names- the names of the required SQL Query Engines instances to be excluded- Returns:
- the number of successfully engines added to negative processing cache
-
resetDontProcessingCache
Updates the negative processing cache.- Parameters:
names- the names of the required SQL Query Engines instances to be reset- Returns:
- the number of successfully engines removed from negative processing cache
-
setSqlEngineFactory
Sets the SQL Engine factory instance- Parameters:
sqlEngineFactory- the SQL Engine factory instance
-