ehcache

net.sf.ehcache.search.impl
Interface SearchManager

All Known Implementing Classes:
MemoryOnlyStore.BruteForceSearchManager

public interface SearchManager

Interface for ehcache search engine implementations

Author:
teck

Method Summary
 void clear(String cacheName, int segmentId)
          Clear a segment of the given cache
 Results executeQuery(String cacheName, StoreQuery query, Map<String,AttributeExtractor> attributeExtractors)
          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
 

Method Detail

executeQuery

Results executeQuery(String cacheName,
                     StoreQuery query,
                     Map<String,AttributeExtractor> attributeExtractors)
Execute a query against the given cache

Parameters:
cacheName - cache name
query - query to execute
attributeExtractors - defined attribute extractors for the cache
Returns:
search results

put

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

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

remove

void remove(String cacheName,
            String uniqueKey,
            int segmentId)
Notify an element removed from a segment of a given cache

Parameters:
cacheName - cache name
uniqueKey - unique key of element
segmentId - segment of cache

clear

void clear(String cacheName,
           int segmentId)
Clear a segment of the given cache

Parameters:
cacheName - cache name to clear
segmentId - segment of cache

move

void move(String cacheName,
          int segmentId,
          String existingKey,
          String newKey)
Update the unqiue key for an existing entry

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.