Class BruteForceSearchManager

  • All Implemented Interfaces:
    SearchManager

    public class BruteForceSearchManager
    extends java.lang.Object
    implements SearchManager
    Brute force search implementation
    Author:
    teck
    • Constructor Detail

      • BruteForceSearchManager

        public BruteForceSearchManager​(Ehcache cache)
        Create a BruteForceSearchManager
        Parameters:
        cache -
    • Method Detail

      • clear

        public void clear​(java.lang.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​(java.lang.String cacheName,
                        int segmentId,
                        Element element,
                        byte[] key,
                        java.util.Map<java.lang.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​(java.lang.String cacheName,
                           java.lang.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 java.util.Set<Attribute> getSearchAttributes​(java.lang.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