Package net.sf.ehcache.store
Class BruteForceSearchManager
- java.lang.Object
-
- net.sf.ehcache.store.BruteForceSearchManager
-
- All Implemented Interfaces:
SearchManager
public class BruteForceSearchManager extends java.lang.Object implements SearchManager
Brute force search implementation- Author:
- teck
-
-
Constructor Summary
Constructors Constructor Description BruteForceSearchManager(Ehcache cache)Create a BruteForceSearchManager
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear(java.lang.String cacheName, int segmentId)Clear a segment of the given cacheResultsexecuteQuery(StoreQuery query, java.util.Map<java.lang.String,AttributeExtractor> extractors, DynamicAttributesExtractor dynIndexer)Execute a query against the given cachejava.util.Set<Attribute>getSearchAttributes(java.lang.String cacheName)Returns all known search attributes for cache with given namevoidput(java.lang.String cacheName, int segmentId, Element element, byte[] key, java.util.Map<java.lang.String,AttributeExtractor> extractors, DynamicAttributesExtractor dynamicIndexer)Notify an element added to a segment of a given cachevoidremove(java.lang.String cacheName, java.lang.Object key, int segmentId, boolean isRemoval)Notify an element removed from a segment of a given cachevoidsetBruteForceSource(net.sf.ehcache.store.BruteForceSource bruteForceSource)Sets the BruteForceSource to be used for search
-
-
-
Constructor Detail
-
BruteForceSearchManager
public BruteForceSearchManager(Ehcache cache)
Create a BruteForceSearchManager- Parameters:
cache-
-
-
Method Detail
-
executeQuery
public Results executeQuery(StoreQuery query, java.util.Map<java.lang.String,AttributeExtractor> extractors, DynamicAttributesExtractor dynIndexer)
Description copied from interface:SearchManagerExecute a query against the given cache- Specified by:
executeQueryin interfaceSearchManager- Parameters:
query- query to executeextractors- defined attribute extractors for the cachedynIndexer- dynamic attribute extractor (if any)- Returns:
- search results
-
clear
public void clear(java.lang.String cacheName, int segmentId)Description copied from interface:SearchManagerClear a segment of the given cache- Specified by:
clearin interfaceSearchManager- Parameters:
cacheName- cache name to clearsegmentId- segment of cache
-
put
public void put(java.lang.String cacheName, int segmentId, Element element, byte[] key, java.util.Map<java.lang.String,AttributeExtractor> extractors, DynamicAttributesExtractor dynamicIndexer)Description copied from interface:SearchManagerNotify an element added to a segment of a given cache- Specified by:
putin interfaceSearchManager- Parameters:
cacheName- cache namesegmentId- segment of cacheelement- element being added to cachekey- serialized form of the element keyextractors- the attribute extractors for the cachedynamicIndexer- dynamic attribute extractor (if any)
-
remove
public void remove(java.lang.String cacheName, java.lang.Object key, int segmentId, boolean isRemoval)Description copied from interface:SearchManagerNotify an element removed from a segment of a given cache- Specified by:
removein interfaceSearchManager- Parameters:
cacheName- cache namekey- unique key of elementsegmentId- segment of cacheisRemoval- true if called as a result of actual storage engine removal (as opposed to move), false otherwise
-
getSearchAttributes
public java.util.Set<Attribute> getSearchAttributes(java.lang.String cacheName)
Description copied from interface:SearchManagerReturns all known search attributes for cache with given name- Specified by:
getSearchAttributesin interfaceSearchManager- Returns:
-
setBruteForceSource
public void setBruteForceSource(net.sf.ehcache.store.BruteForceSource bruteForceSource)
Sets the BruteForceSource to be used for search- Parameters:
bruteForceSource- the source
-
-