protected static class MemoryOnlyStore.BruteForceSearchManager extends java.lang.Object implements SearchManager
Modifier and Type | Field and Description |
---|---|
private MemoryOnlyStore |
memoryStore |
Constructor and Description |
---|
BruteForceSearchManager()
Create a BruteForceSearchManager
|
Modifier and Type | Method and Description |
---|---|
private void |
aggregate(java.util.List<AggregatorInstance<?>> aggregators,
java.util.Map<java.lang.String,AttributeExtractor> extractors,
Element element) |
void |
clear(java.lang.String cacheName,
int segmentId)
Clear a segment of the given cache
|
Results |
executeQuery(java.lang.String cacheName,
StoreQuery query,
java.util.Map<java.lang.String,AttributeExtractor> extractors)
Execute a query against the given cache
|
private java.util.Map<java.lang.String,java.lang.Object> |
getAttributeValues(java.util.Set<Attribute<?>> attributes,
java.util.Map<java.lang.String,AttributeExtractor> extractors,
Element element) |
private java.lang.Object[] |
getSortAttributes(StoreQuery query,
java.util.Map<java.lang.String,AttributeExtractor> extractors,
Element element) |
void |
put(java.lang.String cacheName,
int segmentId,
Element element,
java.util.Map<java.lang.String,AttributeExtractor> extractors,
DynamicAttributesExtractor dynamicIndexer)
Notify an element added to a segment of a given cache
|
void |
remove(java.lang.String cacheName,
java.lang.Object uniqueKey,
int segmentId,
boolean isRemoval)
Notify an element removed from a segment of a given cache
|
void |
setMemoryStore(MemoryOnlyStore memoryStore)
set the memory store
|
private void |
setResultAggregators(java.util.List<AggregatorInstance<?>> aggregators,
BaseResult result) |
private volatile MemoryOnlyStore memoryStore
public BruteForceSearchManager()
public void setMemoryStore(MemoryOnlyStore memoryStore)
memoryStore
- public void put(java.lang.String cacheName, int segmentId, Element element, java.util.Map<java.lang.String,AttributeExtractor> extractors, DynamicAttributesExtractor dynamicIndexer)
SearchManager
put
in interface SearchManager
cacheName
- cache namesegmentId
- segment of cacheelement
- element being added to cacheextractors
- the attribute extractors for the cachedynamicIndexer
- dynamicIndexer dynamic attribute extractor (if any)public Results executeQuery(java.lang.String cacheName, StoreQuery query, java.util.Map<java.lang.String,AttributeExtractor> extractors)
SearchManager
executeQuery
in interface SearchManager
cacheName
- cache namequery
- query to executeextractors
- defined attribute extractors for the cacheprivate void setResultAggregators(java.util.List<AggregatorInstance<?>> aggregators, BaseResult result)
private java.util.Map<java.lang.String,java.lang.Object> getAttributeValues(java.util.Set<Attribute<?>> attributes, java.util.Map<java.lang.String,AttributeExtractor> extractors, Element element)
private void aggregate(java.util.List<AggregatorInstance<?>> aggregators, java.util.Map<java.lang.String,AttributeExtractor> extractors, Element element)
private java.lang.Object[] getSortAttributes(StoreQuery query, java.util.Map<java.lang.String,AttributeExtractor> extractors, Element element)
public void remove(java.lang.String cacheName, java.lang.Object uniqueKey, int segmentId, boolean isRemoval)
SearchManager
remove
in interface SearchManager
cacheName
- cache nameuniqueKey
- unique key of elementsegmentId
- segment of cacheisRemoval
- true if called as a result of actual storage engine removal (as opposed to move), false otherwisepublic void clear(java.lang.String cacheName, int segmentId)
SearchManager
clear
in interface SearchManager
cacheName
- cache name to clearsegmentId
- segment of cache