ehcache

net.sf.ehcache.store
Class MemoryStore.BruteForceSearchManager

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

public static class MemoryStore.BruteForceSearchManager
extends Object
implements SearchManager

Brute force search implementation

Author:
teck

Constructor Summary
MemoryStore.BruteForceSearchManager()
          Create a BruteForceSearchManager
 
Method Summary
 void clear(String cacheName, int segmentId)
          Clear a segment of the given cache
 Results executeQuery(String cacheName, StoreQuery query, Map<String,AttributeExtractor> extractors)
          Execute a query against the given cache
 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 setMemoryStore(CopyingCacheStore<? extends MemoryStore> copyingCacheStore)
          set the memory store, keeping a ref to the copying wrapping instance
 void setMemoryStore(MemoryStore memoryStore)
          set the memory store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryStore.BruteForceSearchManager

public MemoryStore.BruteForceSearchManager()
Create a BruteForceSearchManager

Method Detail

setMemoryStore

public void setMemoryStore(MemoryStore memoryStore)
set the memory store

Parameters:
memoryStore -

setMemoryStore

public void setMemoryStore(CopyingCacheStore<? extends MemoryStore> copyingCacheStore)
set the memory store, keeping a ref to the copying wrapping instance

Parameters:
copyingCacheStore -

executeQuery

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

Specified by:
executeQuery in interface SearchManager
Parameters:
cacheName - cache name
query - query to execute
extractors - defined attribute extractors for the cache
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 - 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

ehcache

Copyright 2001-2014, Terracotta, Inc.