Author: epbernard
Date: 2007-07-30 18:48:45 -0400 (Mon, 30 Jul 2007)
New Revision: 12853
Modified:
trunk/HibernateExt/search/src/java/org/hibernate/search/Environment.java
trunk/HibernateExt/search/src/java/org/hibernate/search/filter/MRUFilterCachingStrategy.java
Log:
HSEARCH-58 refine the filtercaching strategy property names
Modified: trunk/HibernateExt/search/src/java/org/hibernate/search/Environment.java
===================================================================
--- trunk/HibernateExt/search/src/java/org/hibernate/search/Environment.java 2007-07-30
21:59:45 UTC (rev 12852)
+++ trunk/HibernateExt/search/src/java/org/hibernate/search/Environment.java 2007-07-30
22:48:45 UTC (rev 12853)
@@ -52,11 +52,8 @@
*/
public static final String READER_STRATEGY = READER_PREFIX + "strategy";
/**
- * filter caching strategy
+ * filter caching strategy class (must have a no-arg constructor and implements
FilterCachingStrategy)
*/
- public static final String FILTER_CACHING_STRATEGY_PREFIX =
"hibernate.search.filter.cache_strategy.";
- /**
- * filter caching strategy class (must have a no-arg constructor and implements
FilterCachingStrategy
- */
- public static final String FILTER_CACHING_STRATEGY_IMPL =
"hibernate.search.filter.cache_strategy.impl";
+ public static final String FILTER_CACHING_STRATEGY =
"hibernate.search.filter.cache_strategy";
+
}
Modified:
trunk/HibernateExt/search/src/java/org/hibernate/search/filter/MRUFilterCachingStrategy.java
===================================================================
---
trunk/HibernateExt/search/src/java/org/hibernate/search/filter/MRUFilterCachingStrategy.java 2007-07-30
21:59:45 UTC (rev 12852)
+++
trunk/HibernateExt/search/src/java/org/hibernate/search/filter/MRUFilterCachingStrategy.java 2007-07-30
22:48:45 UTC (rev 12853)
@@ -18,18 +18,18 @@
public class MRUFilterCachingStrategy implements FilterCachingStrategy {
private static final String DEFAULT_SIZE = "128";
private SoftLimitMRUCache cache;
+ private static final String SIZE = Environment.FILTER_CACHING_STRATEGY +
".size";
public void initialize(Properties properties) {
int size;
try {
size = Integer.parseInt(
- properties.getProperty( Environment.FILTER_CACHING_STRATEGY_PREFIX +
"size", DEFAULT_SIZE )
+ properties.getProperty( SIZE, DEFAULT_SIZE )
);
}
catch (NumberFormatException nfe) {
throw new SearchException(
- "Unable to parse " + Environment.FILTER_CACHING_STRATEGY_PREFIX +
"size: "
- + properties.getProperty( Environment.FILTER_CACHING_STRATEGY_PREFIX +
"size", DEFAULT_SIZE ), nfe
+ "Unable to parse " + SIZE + ": " + properties.getProperty( SIZE,
DEFAULT_SIZE ), nfe
);
}
Show replies by date