public class SqlDefaultFactoryMXBean extends Object
The factory can be based on Spring DI framework for example.
For more info please see the Tutorials.
| Modifier and Type | Field and Description |
|---|---|
private SqlEngineFactory |
sqlEngineFactory
The SQL Engine factory instance
|
| Constructor and Description |
|---|
SqlDefaultFactoryMXBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearConfiguration()
Resets the state of the dynamic configuration instance.
|
void |
clearConfigurationUsage()
Reset the engines' usage counters.
|
Integer |
getAsyncInitThreads()
Returns the number of threads used for asynchronous initialization
|
private SqlEngineConfiguration |
getConfiguration()
Returns the dynamic SQL Processor configuration ant checks it's not null
|
List<String> |
getCrudDynamicNames()
Returns the collection of names of all initialized/constructed dynamic SQL CRUD Engine instances.
|
List<String> |
getCrudEngineProcessingCache(String name)
Returns the processing cache used for the selected SQL CRUD Engine
|
List<String> |
getCrudEngineProcessingCacheStatistics(String name)
Returns the processing cache statistics used for the selected SQL CRUD Engine
|
List<String> |
getCrudEnginesToInit()
Returns the container of the CRUD Engines' names, which has to be initialized.
|
int |
getCrudEngineUsage(String name)
Returns the CRUD Engine usage number.
|
List<String> |
getCrudNames()
Returns the collection of names of all initialized/constructed static SQL CRUD Engine instances.
|
List<String> |
getDontProcessingCacheEngines()
Returns the list of engines, for which the processing cache can't be used
|
List<String> |
getDoProcessingCacheEngines()
Returns the list of engines, for which the processing cache can be used
|
String |
getEnginesInitErrors()
Returns the result of engines initialization process.
|
Boolean |
getInitInUsageOrder()
Returns the indicator that the most frequently used engines should be initialized preferentially
|
Integer |
getInitTreshold()
Returns the initialization threshold.
|
List<String> |
getProcedureDynamicNames()
Returns the collection of names of all initialized/constructed dynamic SQL ProcedureEngine instances.
|
List<String> |
getProcedureEngineProcessingCache(String name)
Returns the processing cache used for the selected SQL Procedure Engine
|
List<String> |
getProcedureEngineProcessingCacheStatistics(String name)
Returns the processing cache statistics used for the selected SQL Procedure Engine
|
List<String> |
getProcedureEnginesToInit()
Returns the container of the Procedure Engines' names, which has to be initialized.
|
int |
getProcedureEngineUsage(String name)
Returns the Procedure Engine usage number.
|
List<String> |
getProcedureNames()
Returns the collection of names of all initialized/constructed static SQL ProcedureEngine instances.
|
List<String> |
getQueryDynamicNames()
Returns the collection of names of all initialized/constructed dynamic SQL Query Engine instances.
|
List<String> |
getQueryEngineProcessingCache(String name)
Returns the processing cache used for the selected SQL Query Engine
|
List<String> |
getQueryEngineProcessingCacheStatistics(String name)
Returns the processing cache statistics used for the selected SQL Query Engine
|
List<String> |
getQueryEnginesToInit()
Returns the container of the Query Engines' names, which has to be initialized.
|
int |
getQueryEngineUsage(String name)
Returns the Query Engine usage number.
|
List<String> |
getQueryNames()
Returns the collection of names of all initialized/constructed static SQL Query Engine instances.
|
Boolean |
getUseDynamicProcessingCache()
Returns the indicator that the processing cache can be used dynamically
|
Boolean |
getUseProcessingCache()
Returns the indicator that the processing cache can be used
|
int |
initCrudEngines(String names)
In the case the SQL CRUD Engines are not initialized, a new static instances are established in the cache.
|
int |
initDontProcessingCache(String names)
Updates the negative processing cache.
|
int |
initDoProcessingCache(String names)
Updates the positive processing cache.
|
int |
initProcedureEngines(String names)
In the case the SQL Procedure Engines are not initialized, a new static instances are established in the cache.
|
int |
initQueryEngines(String names)
In the case the SQL Query Engines are not initialized, a new static instances are established in the cache.
|
Boolean |
isAsyncInitFinished()
Returns the flag indicating the asynchronous SQL Processor engines initialization has been finished.
|
boolean |
isLazyInit()
Returns the indicator to speed up the initialization process
|
void |
loadConfiguration()
Loads the persisted configuration.
|
void |
newCrudEngine(String name,
String sqlStatement)
A new dynamic SQL CRUD Engine instance is established in the cache.
|
void |
newProcedureEngine(String name,
String sqlStatement)
A new dynamic SQL Procedure Engine instance is established in the cache.
|
void |
newQueryEngine(String name,
String sqlStatement)
A new dynamic SQL Query Engine instance is established in the cache.
|
int |
resetCrudEngineProcessingCache(String name,
String names)
Clears the processing cache used for the selected SQL CRUD Engine
|
int |
resetCrudEngines(String names)
In the case any dynamic SQL CRUD Engine is in the cache, the static one is re-established.
|
int |
resetCrudEngineUsage(String name)
Resets the CRUD Engine usage number.
|
int |
resetDontProcessingCache(String names)
Updates the negative processing cache.
|
int |
resetDoProcessingCache(String names)
Updates the positive processing cache.
|
int |
resetProcedureEngineProcessingCache(String name,
String names)
Clears the processing cache used for the selected SQL Procedure Engine
|
int |
resetProcedureEngines(String names)
In the case a dynamic SQL Procedure Engine is in the cache, the static one is re-established.
|
int |
resetProcedureEngineUsage(String name)
Resets the Procedure Engine usage number.
|
int |
resetQueryEngineProcessingCache(String name,
String names)
Clears the processing cache used for the selected SQL Query Engine
|
int |
resetQueryEngines(String names)
In the case any dynamic SQL Query Engine is in the cache, the static one is re-established.
|
int |
resetQueryEngineUsage(String name)
Resets the Query Engine usage number.
|
void |
setAsyncInitThreads(Integer asyncInitThreads)
Sets the number of threads used for asynchronous initialization
|
void |
setInitInUsageOrder(Boolean initInUsageOrder)
Sets the indicator that the most frequently used engines should be initialized preferentially
|
void |
setInitTreshold(Integer initTreshold)
Sets the initialization threshold.
|
void |
setLazyInit(boolean lazyInit)
Sets the indicator to speed up the initialization process
|
void |
setSqlEngineFactory(SqlEngineFactory sqlEngineFactory)
Sets the SQL Engine factory instance
|
void |
setUseDynamicProcessingCache(Boolean useDynamicProcessingCache)
Sets the indicator that the processing cache can be used dynamically
|
void |
setUseProcessingCache(Boolean useProcessingCache)
Sets the indicator that the processing cache can be used
|
void |
storeConfiguration()
Persists the configuration into the external file.
|
private List<String> |
toList(Map<String,Integer> map)
Converts list
|
private SqlEngineFactory sqlEngineFactory
public int initQueryEngines(String names)
names - the names of the required SQL Query Engines instancespublic int initCrudEngines(String names)
names - the names of the required SQL CRUD Engines instancespublic int initProcedureEngines(String names)
names - the names of the required SQL Procedure Engines instancespublic int resetQueryEngines(String names)
names - the names of the required SQL Query Engines instancespublic int resetCrudEngines(String names)
names - the names of the required SQL CRUD Engines instancespublic int resetProcedureEngines(String names)
names - the names of the required SQL Procedure Engines instancespublic void newQueryEngine(String name, String sqlStatement) throws SqlEngineException
name - the name of the required SQL Query Engine instancesqlStatement - the new SQL statement, which is going to replace the original oneSqlEngineExceptionpublic void newCrudEngine(String name, String sqlStatement)
name - the name of the required SQL CRUD Engine instancesqlStatement - the new SQL statement, which is going to replace the original onepublic void newProcedureEngine(String name, String sqlStatement)
name - the name of the required SQL Procedure Engine instancesqlStatement - the new SQL statement, which is going to replace the original onepublic List<String> getQueryNames()
public List<String> getQueryDynamicNames()
public List<String> getCrudNames()
public List<String> getCrudDynamicNames()
public List<String> getProcedureNames()
public List<String> getProcedureDynamicNames()
public List<String> getQueryEngineProcessingCache(String name)
name - the name of the required SQL Query Enginepublic List<String> getCrudEngineProcessingCache(String name)
name - the name of the required SQL CRUD Enginepublic List<String> getProcedureEngineProcessingCache(String name)
name - the name of the required SQL Procedure Enginepublic List<String> getQueryEngineProcessingCacheStatistics(String name)
name - the name of the required SQL Query Enginepublic List<String> getCrudEngineProcessingCacheStatistics(String name)
name - the name of the required SQL CRUD Enginepublic List<String> getProcedureEngineProcessingCacheStatistics(String name)
name - the name of the required SQL Procedure Enginepublic int resetQueryEngineProcessingCache(String name, String names)
name - the name of the required SQL Query Enginenames - the names of the processing cache entries to be clearedpublic int resetCrudEngineProcessingCache(String name, String names)
name - the name of the required SQL CRUD Enginenames - the names of the processing cache entries to be clearedpublic int resetProcedureEngineProcessingCache(String name, String names)
name - the name of the required SQL Procedure Enginenames - the names of the processing cache entries to be clearedprivate SqlEngineConfiguration getConfiguration()
public boolean isLazyInit()
public void setLazyInit(boolean lazyInit)
lazyInit - the indicator to speed up the initialization processpublic Integer getAsyncInitThreads()
public void setAsyncInitThreads(Integer asyncInitThreads)
asyncInitThreads - the number of threads used for asynchronous initializationpublic Integer getInitTreshold()
public void setInitTreshold(Integer initTreshold)
initTreshold - the initialization threshold. The engines, which usage is at least this number should be initialized
directlypublic Boolean getInitInUsageOrder()
public void setInitInUsageOrder(Boolean initInUsageOrder)
initInUsageOrder - the indicator that the most frequently used engines should be initialized preferentiallypublic Boolean isAsyncInitFinished()
public String getEnginesInitErrors()
public void loadConfiguration()
public void storeConfiguration()
public void clearConfiguration()
public void clearConfigurationUsage()
private List<String> toList(Map<String,Integer> map)
map - the input listpublic List<String> getQueryEnginesToInit()
public List<String> getCrudEnginesToInit()
public List<String> getProcedureEnginesToInit()
public int getQueryEngineUsage(String name)
name - the name of the SQL Query Enginepublic int getCrudEngineUsage(String name)
name - the name of the SQL CRUD Enginepublic int getProcedureEngineUsage(String name)
name - the name of the SQL Procedure Enginepublic int resetQueryEngineUsage(String name)
name - the name of the SQL Query Enginepublic int resetCrudEngineUsage(String name)
name - the name of the SQL CRUD Enginepublic int resetProcedureEngineUsage(String name)
name - the name of the SQL Procedure Enginepublic Boolean getUseProcessingCache()
public void setUseProcessingCache(Boolean useProcessingCache)
useProcessingCache - the indicator that the processing cache can be usedpublic Boolean getUseDynamicProcessingCache()
public void setUseDynamicProcessingCache(Boolean useDynamicProcessingCache)
useDynamicProcessingCache - the indicator that the processing cache can be used dynamicallypublic List<String> getDoProcessingCacheEngines()
public int initDoProcessingCache(String names)
names - the names of the required SQL Query Engines instancespublic int resetDoProcessingCache(String names)
names - the names of the required SQL Query Engines instances to be removedpublic List<String> getDontProcessingCacheEngines()
public int initDontProcessingCache(String names)
names - the names of the required SQL Query Engines instances to be excludedpublic int resetDontProcessingCache(String names)
names - the names of the required SQL Query Engines instances to be resetpublic void setSqlEngineFactory(SqlEngineFactory sqlEngineFactory)
sqlEngineFactory - the SQL Engine factory instanceCopyright © 2018. All rights reserved.