ehcache

net.sf.ehcache.search.query
Class QueryManagerBuilder

java.lang.Object
  extended by net.sf.ehcache.search.query.QueryManagerBuilder

public final class QueryManagerBuilder
extends Object

A Query Manager builder providing methods to add caches which can be queried. The Query Manager instance returned by this builder can be used to execute search queries expressed as Big Memory Structured Query Language (BMSQL) statements.

Author:
dkumar

Method Summary
 QueryManagerBuilder addAllCachesCurrentlyIn(CacheManager cacheManager)
          Adds all Caches present in a Cache Manager to the internal state of the query manager.
 QueryManagerBuilder addCache(Ehcache cache)
          Adds a Cache to the internal state and allows it to be used as a target in a BMSQL statement's FROM clause.
 QueryManager build()
          Returns a new Query Manager using the options supplied during the building process.
static QueryManagerBuilder newQueryManagerBuilder()
          Creates a new Query Manager builder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newQueryManagerBuilder

public static QueryManagerBuilder newQueryManagerBuilder()
Creates a new Query Manager builder.

Returns:
this for the builder pattern

addCache

public QueryManagerBuilder addCache(Ehcache cache)
Adds a Cache to the internal state and allows it to be used as a target in a BMSQL statement's FROM clause.

Parameters:
cache - a cache instance to be added
Returns:
this for the builder pattern

addAllCachesCurrentlyIn

public QueryManagerBuilder addAllCachesCurrentlyIn(CacheManager cacheManager)
Adds all Caches present in a Cache Manager to the internal state of the query manager. The added caches can be used in a BMSQL statement's FROM clause.

Parameters:
cacheManager - a Cache Manager whose caches need to be added
Returns:
this for the builder pattern

build

public QueryManager build()
Returns a new Query Manager using the options supplied during the building process.

Returns:
the fully constructed Query Manager

ehcache

Copyright 2001-2016, Terracotta, Inc.