ehcache

net.sf.ehcache.store
Class BruteForceSearchManager

java.lang.Object
  extended by net.sf.ehcache.store.BruteForceSearchManager
All Implemented Interfaces:
SearchManager

public class BruteForceSearchManager
extends Object
implements SearchManager

Brute force search implementation

Author:
teck

Constructor Summary
BruteForceSearchManager(Ehcache cache)
          Create a BruteForceSearchManager
 
Method Summary
 void clear(String cacheName, int segmentId)
          Clear a segment of the given cache
 Results executeQuery(StoreQuery query, Map<String,AttributeExtractor> extractors, DynamicAttributesExtractor dynIndexer)
          Execute a query against the given cache
 Set<Attribute> getSearchAttributes(String cacheName)
          Returns all known search attributes for cache with given name
 void put(String cacheName, int segmentId, Element element, byte[] key, Map<String,AttributeExtractor> extractors, DynamicAttributesExtractor dynamicIndexer)
          Notify an element added to a segment of a given cache
 void remove(String cacheName, Object key, int segmentId, boolean isRemoval)
          Notify an element removed from a segment of a given cache
 void setBruteForceSource(net.sf.ehcache.store.BruteForceSource bruteForceSource)
          Sets the BruteForceSource to be used for search
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BruteForceSearchManager

public BruteForceSearchManager(Ehcache cache)
Create a BruteForceSearchManager

Parameters:
cache -
Method Detail

executeQuery

public Results executeQuery(StoreQuery query,
                            Map<String,AttributeExtractor> extractors,
                            DynamicAttributesExtractor dynIndexer)
Description copied from interface: SearchManager
Execute a query against the given cache

Specified by:
executeQuery in interface SearchManager
Parameters:
query - query to execute
extractors - defined attribute extractors for the cache
dynIndexer - dynamic attribute extractor (if any)
Returns:
search results

clear

public void clear(String cacheName,
                  int segmentId)
Description copied from interface: SearchManager
Clear a segment of the given cache

Specified by:
clear in interface SearchManager
Parameters:
cacheName - cache name to clear
segmentId - segment of cache

put

public void put(String cacheName,
                int segmentId,
                Element element,
                byte[] key,
                Map<String,AttributeExtractor> extractors,
                DynamicAttributesExtractor dynamicIndexer)
Description copied from interface: SearchManager
Notify an element added to a segment of a given cache

Specified by:
put in interface SearchManager
Parameters:
cacheName - cache name
segmentId - segment of cache
element - element being added to cache
key - serialized form of the element key
extractors - the attribute extractors for the cache
dynamicIndexer - dynamic attribute extractor (if any)

remove

public void remove(String cacheName,
                   Object key,
                   int segmentId,
                   boolean isRemoval)
Description copied from interface: SearchManager
Notify an element removed from a segment of a given cache

Specified by:
remove in interface SearchManager
Parameters:
cacheName - cache name
key - unique key of element
segmentId - segment of cache
isRemoval - true if called as a result of actual storage engine removal (as opposed to move), false otherwise

getSearchAttributes

public Set<Attribute> getSearchAttributes(String cacheName)
Description copied from interface: SearchManager
Returns all known search attributes for cache with given name

Specified by:
getSearchAttributes in interface SearchManager
Returns:

setBruteForceSource

public void setBruteForceSource(net.sf.ehcache.store.BruteForceSource bruteForceSource)
Sets the BruteForceSource to be used for search

Parameters:
bruteForceSource - the source

ehcache

Copyright 2001-2014, Terracotta, Inc.