Class QueryEngineRegistry

java.lang.Object
com.tangosol.coherence.rest.query.QueryEngineRegistry

public class QueryEngineRegistry extends Object
A registry for QueryEngine instances.
Author:
ic 2011.12.03
  • Field Details

    • m_mapQueryEngines

      protected Map<String,QueryEngine> m_mapQueryEngines
      A map of registered QueryEngines, keyed by engine names.
  • Constructor Details

    • QueryEngineRegistry

      public QueryEngineRegistry()
      Construct a QueryEngineRegistry instance.

      Invoking this constructor will register a CoherenceQueryLanguageEngine as the default query engine.

      See Also:
    • 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 Details

    • registerQueryEngine

      public void registerQueryEngine(String sName, Class clzQueryEngine)
      Register a query engine for the specified name.
      Parameters:
      sName - query engine name
      clzQueryEngine - query engine class
    • registerQueryEngine

      public void registerQueryEngine(String sName, QueryEngine queryEngine)
      Register a query engine for the specified name.
      Parameters:
      sName - query engine name
      queryEngine - 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