Class QueryEngineRegistry
- java.lang.Object
-
- com.tangosol.coherence.rest.query.QueryEngineRegistry
-
public class QueryEngineRegistry extends Object
A registry forQueryEngine
instances.- Author:
- ic 2011.12.03
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,QueryEngine>
m_mapQueryEngines
A map of registered QueryEngines, keyed by engine names.
-
Constructor Summary
Constructors Constructor Description QueryEngineRegistry()
Construct a QueryEngineRegistry instance.QueryEngineRegistry(Collection<? extends QueryEngineConfig> colConfig)
Construct a QueryEngineRegistry instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static QueryEngine
createQueryEngine(Class clzQueryEngine)
Create a query engine instance.QueryEngine
getQueryEngine(String sName)
Return a query engine for the specified name.void
registerQueryEngine(String sName, QueryEngine queryEngine)
Register a query engine for the specified name.void
registerQueryEngine(String sName, Class clzQueryEngine)
Register a query engine for the specified name.
-
-
-
Field Detail
-
m_mapQueryEngines
protected Map<String,QueryEngine> m_mapQueryEngines
A map of registered QueryEngines, keyed by engine names.
-
-
Constructor Detail
-
QueryEngineRegistry
public QueryEngineRegistry()
Construct a QueryEngineRegistry instance.Invoking this constructor will register a CoherenceQueryLanguageEngine as the default query engine.
- See Also:
CoherenceQueryLanguageEngine
-
QueryEngineRegistry
public QueryEngineRegistry(Collection<? extends QueryEngineConfig> colConfig)
Construct a QueryEngineRegistry instance.Invoking this constructor will register a CoherenceQueryLanguageEngine as the default query engine. Any of provided configurations with name "DEFAULT" will override this one as default query engine.
- Parameters:
colConfig
- query engine configurations to be registered
-
-
Method Detail
-
registerQueryEngine
public void registerQueryEngine(String sName, Class clzQueryEngine)
Register a query engine for the specified name.- Parameters:
sName
- query engine nameclzQueryEngine
- query engine class
-
registerQueryEngine
public void registerQueryEngine(String sName, QueryEngine queryEngine)
Register a query engine for the specified name.- Parameters:
sName
- query engine namequeryEngine
- query engine
-
getQueryEngine
public QueryEngine getQueryEngine(String sName)
Return a query engine for the specified name.If none found, the default query engine will be returned.
- Parameters:
sName
- name of the query engine- Returns:
- query engine for the specified name or default query engine
-
createQueryEngine
protected static QueryEngine createQueryEngine(Class clzQueryEngine)
Create a query engine instance.- Parameters:
clzQueryEngine
- query engine class- Returns:
- query engine instance
-
-