org.hibernate.search.filter
Class MRUFilterCachingStrategy

java.lang.Object
  extended by org.hibernate.search.filter.MRUFilterCachingStrategy
All Implemented Interfaces:
FilterCachingStrategy

public class MRUFilterCachingStrategy
extends Object
implements FilterCachingStrategy

Keep the most recently used Filters in the cache The cache is at least as big as hibernate.search.filter.cache_strategy.size Above this limit, Filters are kept as soft references

Author:
Emmanuel Bernard

Constructor Summary
MRUFilterCachingStrategy()
           
 
Method Summary
 void addCachedFilter(FilterKey key, Filter filter)
          Propose a candidate filter for caching
 Filter getCachedFilter(FilterKey key)
          Retrieve the cached filter for a given key or null if not cached
 void initialize(Properties properties)
          initialize the strategy from the properties The Properties must not be changed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MRUFilterCachingStrategy

public MRUFilterCachingStrategy()
Method Detail

initialize

public void initialize(Properties properties)
Description copied from interface: FilterCachingStrategy
initialize the strategy from the properties The Properties must not be changed

Specified by:
initialize in interface FilterCachingStrategy

getCachedFilter

public Filter getCachedFilter(FilterKey key)
Description copied from interface: FilterCachingStrategy
Retrieve the cached filter for a given key or null if not cached

Specified by:
getCachedFilter in interface FilterCachingStrategy

addCachedFilter

public void addCachedFilter(FilterKey key,
                            Filter filter)
Description copied from interface: FilterCachingStrategy
Propose a candidate filter for caching

Specified by:
addCachedFilter in interface FilterCachingStrategy


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved