public abstract class LuceneAccessor extends LuceneOperationsSupport implements InitializingBean
LuceneAccessor is an abstract class supporting implementations of the LuceneOperations interface
encapsulating common functionality necessary to execute Lucene queries.InitializingBean,
LuceneOperationsSupport,
GemFireCache,
Region,
LuceneIndex,
LuceneQuery,
LuceneQueryFactory,
LuceneService,
LuceneServiceProvider| Modifier and Type | Class and Description |
|---|---|
protected static interface |
LuceneAccessor.LuceneQueryExecutor<T> |
DEFAULT_PAGE_SIZE, DEFAULT_RESULT_LIMIT| Constructor and Description |
|---|
LuceneAccessor()
Constructs an uninitialized instance of
LuceneAccessor. |
LuceneAccessor(org.apache.geode.cache.lucene.LuceneIndex luceneIndex)
Constructs an instance of the
LuceneAccessor initialized with the given LuceneIndex
used to perform Lucene queries (searches). |
LuceneAccessor(String indexName,
org.apache.geode.cache.Region<?,?> region)
Constructs an instance of the
LuceneAccessor initialized with the given Lucene index name
and Region reference upon which Lucene queries are executed. |
LuceneAccessor(String indexName,
String regionPath)
Constructs an instance of the
LuceneAccessor initialized with the given Lucene index name
and Region reference upon which Lucene queries are executed. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
org.apache.geode.cache.lucene.LuceneQueryFactory |
createLuceneQueryFactory()
Creates an instance of the
LuceneQueryFactory to create and execute Lucene queries. |
org.apache.geode.cache.lucene.LuceneQueryFactory |
createLuceneQueryFactory(int resultLimit)
Creates an instance of the
LuceneQueryFactory to create and execute Lucene queries. |
org.apache.geode.cache.lucene.LuceneQueryFactory |
createLuceneQueryFactory(int resultLimit,
int pageSize)
Creates an instance of the
LuceneQueryFactory to create and execute Lucene queries. |
protected <T> T |
doFind(LuceneAccessor.LuceneQueryExecutor<T> queryExecutor,
Object query,
String regionPath,
String indexName) |
protected org.apache.geode.cache.GemFireCache |
getCache()
Returns a reference to the
GemFireCache. |
String |
getIndexName()
Returns the name of the
LuceneIndex used in Lucene queries. |
org.apache.geode.cache.lucene.LuceneIndex |
getLuceneIndex()
Returns a reference to the
LuceneIndex used in Lucene queries. |
protected org.apache.geode.cache.lucene.LuceneService |
getLuceneService()
Returns a reference to the
LuceneService used to perform Lucene query data access operations. |
org.apache.geode.cache.Region<?,?> |
getRegion()
Returns a reference to the
Region used to specify Lucene queries. |
String |
getRegionPath()
Returns a fully-qualified pathname to the
Region used to specify Lucene queries. |
protected org.apache.geode.cache.GemFireCache |
resolveCache()
Resolves a reference to the
GemFireCache. |
protected String |
resolveIndexName()
Resolves the name of the
LuceneIndex required in the Lucene data access, query operations
when a LuceneIndex is not specifically provided. |
protected org.apache.geode.cache.lucene.LuceneService |
resolveLuceneService()
Resolves the
LuceneService used by this data access object to perform Lucene queries. |
protected org.apache.geode.cache.lucene.LuceneService |
resolveLuceneService(org.apache.geode.cache.GemFireCache gemfireCache)
Resolves the
LuceneService used by this data access object to perform Lucene queries. |
protected String |
resolveRegionPath()
Resolves the fully-qualified pathname of the
Region to which the Lucene data access, query operations
are performed and the LuceneIndex is applied, when a region path
is not specifically provided. |
<T extends LuceneAccessor> |
setCache(org.apache.geode.cache.GemFireCache gemfireCache)
Sets a reference to the
GemFireCache. |
<T extends LuceneAccessor> |
setIndexName(String indexName)
Sets the name of the
LuceneIndex used in Lucene queries. |
<T extends LuceneAccessor> |
setLuceneIndex(org.apache.geode.cache.lucene.LuceneIndex luceneIndex)
Sets a reference to the
LuceneIndex used in Lucene queries. |
<T extends LuceneAccessor> |
setLuceneService(org.apache.geode.cache.lucene.LuceneService luceneService)
Sets a reference to the
LuceneService used to perform Lucene query data access operations. |
<T extends LuceneAccessor> |
setRegion(org.apache.geode.cache.Region<?,?> region)
Sets a reference to the
Region used to specify Lucene queries. |
<T extends LuceneAccessor> |
setRegionPath(String regionPath)
Sets a fully-qualified pathname to the
Region used to specify Lucene queries. |
query, query, query, query, queryForKeys, queryForKeys, queryForValues, queryForValuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitquery, query, queryForKeys, queryForKeys, queryForValues, queryForValuespublic LuceneAccessor()
LuceneAccessor.public LuceneAccessor(org.apache.geode.cache.lucene.LuceneIndex luceneIndex)
LuceneAccessor initialized with the given LuceneIndex
used to perform Lucene queries (searches).luceneIndex - LuceneIndex used in Lucene queries.LuceneIndexpublic LuceneAccessor(String indexName, org.apache.geode.cache.Region<?,?> region)
LuceneAccessor initialized with the given Lucene index name
and Region reference upon which Lucene queries are executed.indexName - String containing the name of the LuceneIndex used in Lucene queries.region - Region on which Lucene queries are executed.Regionpublic LuceneAccessor(String indexName, String regionPath)
LuceneAccessor initialized with the given Lucene index name
and Region reference upon which Lucene queries are executed.public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic org.apache.geode.cache.lucene.LuceneQueryFactory createLuceneQueryFactory()
LuceneQueryFactory to create and execute Lucene queries.LuceneQueryFactory to create and execute Lucene queries.LuceneQueryFactory,
getLuceneService()public org.apache.geode.cache.lucene.LuceneQueryFactory createLuceneQueryFactory(int resultLimit)
LuceneQueryFactory to create and execute Lucene queries.resultLimit - limit to the number of results returned by the query.LuceneQueryFactory to create and execute Lucene queries.LuceneQueryFactory,
createLuceneQueryFactory(int, int)public org.apache.geode.cache.lucene.LuceneQueryFactory createLuceneQueryFactory(int resultLimit,
int pageSize)
LuceneQueryFactory to create and execute Lucene queries.resultLimit - limit to the number of results returned by the query.pageSize - number of results appearing on a single page.LuceneQueryFactory to create and execute Lucene queries.createLuceneQueryFactory()protected org.apache.geode.cache.GemFireCache resolveCache()
GemFireCache.GemFireCache.CacheUtils.resolveGemFireCache(),
GemFireCache,
getCache()protected org.apache.geode.cache.lucene.LuceneService resolveLuceneService()
LuceneService used by this data access object to perform Lucene queries.GemFireCache LuceneService.LuceneService,
getLuceneService(),
resolveCache(),
resolveLuceneService(GemFireCache)protected org.apache.geode.cache.lucene.LuceneService resolveLuceneService(org.apache.geode.cache.GemFireCache gemfireCache)
LuceneService used by this data access object to perform Lucene queries.gemfireCache - GemFireCache used to resolve the LuceneService.GemFireCache LuceneService.IllegalArgumentException - if GemFireCache is null.LuceneService,
GemFireCacheprotected String resolveIndexName()
LuceneIndex required in the Lucene data access, query operations
when a LuceneIndex is not specifically provided.LuceneIndex.IllegalStateException - if the name of the LuceneIndex cannot be resolved.LuceneIndex.getName(),
getIndexName(),
getLuceneIndex()protected String resolveRegionPath()
Region to which the Lucene data access, query operations
are performed and the LuceneIndex is applied, when a region path
is not specifically provided.String containing the fully-qualified pathname of the Region on which the Lucene
data access, query operations are performed and the LuceneIndex is applied.IllegalStateException - if the fully-qualified pathname of the Region cannot be resolved.getRegionPath(),
getRegion()public <T extends LuceneAccessor> T setCache(org.apache.geode.cache.GemFireCache gemfireCache)
GemFireCache.T - Class type of the LuceneAccessor.gemfireCache - GemFireCache reference.LuceneAccessor.GemFireCacheprotected org.apache.geode.cache.GemFireCache getCache()
GemFireCache.GemFireCache.GemFireCache,
resolveCache()public <T extends LuceneAccessor> T setIndexName(String indexName)
LuceneIndex used in Lucene queries.T - Class type of the LuceneAccessor.indexName - String containing the name of the LuceneIndex.LuceneAccessor.setLuceneIndex(LuceneIndex)public String getIndexName()
LuceneIndex used in Lucene queries.String containing the name of the LuceneIndex.resolveIndexName(),
getLuceneIndex()public <T extends LuceneAccessor> T setLuceneIndex(org.apache.geode.cache.lucene.LuceneIndex luceneIndex)
LuceneIndex used in Lucene queries.T - Class type of the LuceneAccessor.luceneIndex - LuceneIndex used in Lucene data access, query operations.LuceneAccessor.LuceneIndex,
setIndexName(String)public org.apache.geode.cache.lucene.LuceneIndex getLuceneIndex()
LuceneIndex used in Lucene queries.LuceneIndex used in Lucene data access, query operations.LuceneIndex,
resolveIndexName(),
getIndexName()public <T extends LuceneAccessor> T setLuceneService(org.apache.geode.cache.lucene.LuceneService luceneService)
LuceneService used to perform Lucene query data access operations.T - Class type of the LuceneAccessor.luceneService - LuceneService used to perform Lucene queries.LuceneAccessor.LuceneServiceprotected org.apache.geode.cache.lucene.LuceneService getLuceneService()
LuceneService used to perform Lucene query data access operations.LuceneService used to perform Lucene queries.LuceneServicepublic <T extends LuceneAccessor> T setRegion(org.apache.geode.cache.Region<?,?> region)
Region used to specify Lucene queries.T - Class type of the LuceneAccessor.region - Region used to specify Lucene queries.LuceneAccessor.Region,
setRegionPath(String)public org.apache.geode.cache.Region<?,?> getRegion()
Region used to specify Lucene queries.Region used to specify Lucene queries.Region,
resolveRegionPath(),
getRegionPath()public <T extends LuceneAccessor> T setRegionPath(String regionPath)
Region used to specify Lucene queries.T - Class type of the LuceneAccessor.regionPath - String containing the fully-qualified pathname to the Region
used to specify Lucene queries.LuceneAccessor.setRegion(Region)public String getRegionPath()
Region used to specify Lucene queries.String containing the fully-qualified pathname to the Region
used to specify Lucene queries.resolveRegionPath(),
getRegion()protected <T> T doFind(LuceneAccessor.LuceneQueryExecutor<T> queryExecutor, Object query, String regionPath, String indexName)
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.