ehcache

net.sf.ehcache.store
Class MemoryOnlyStore.BruteForceSearchManager

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

protected static class MemoryOnlyStore.BruteForceSearchManager
extends Object
implements SearchManager

Brute force search implementation

Author:
teck

Constructor Summary
MemoryOnlyStore.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 move(String cacheName, int segmentId, String existingKey, String newKey)
          Update the unqiue key for an existing entry
 void put(String cacheName, int segmentId, String uniqueKey, byte[] serializedKey, Element element, Map<String,AttributeExtractor> extractors)
          Notify an element added to a segment of a given cache
 void remove(String cacheName, String uniqueKey, int segmentId)
          Notify an element removed from a segment of a given cache
 void setMemoryStore(MemoryOnlyStore 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

MemoryOnlyStore.BruteForceSearchManager

public MemoryOnlyStore.BruteForceSearchManager()
Create a BruteForceSearchManager

Method Detail

setMemoryStore

public void setMemoryStore(MemoryOnlyStore memoryStore)
set the memory store

Parameters:
memoryStore -

put

public void put(String cacheName,
                int segmentId,
                String uniqueKey,
                byte[] serializedKey,
                Element element,
                Map<String,AttributeExtractor> extractors)
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
uniqueKey - unique key of element
serializedKey - serialized form of the element key
element - element being added to cache
extractors - the attribute extractors for the cache

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

remove

public void remove(String cacheName,
                   String uniqueKey,
                   int segmentId)
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
uniqueKey - unique key of element
segmentId - segment of cache

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

move

public void move(String cacheName,
                 int segmentId,
                 String existingKey,
                 String newKey)
Description copied from interface: SearchManager
Update the unqiue key for an existing entry

Specified by:
move in interface SearchManager
Parameters:
cacheName - cache name to update
segmentId - segment of cache
existingKey - the existing unique key
newKey - the new unique key

ehcache

Copyright © 2003-2012 Terracotta, Inc.. All Rights Reserved.