[hibernate-commits] Hibernate SVN: r14878 - search/trunk/src/java/org/hibernate/search/filter.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Sat Jul 5 13:01:13 EDT 2008


Author: epbernard
Date: 2008-07-05 13:01:12 -0400 (Sat, 05 Jul 2008)
New Revision: 14878

Modified:
   search/trunk/src/java/org/hibernate/search/filter/FilterCachingStrategy.java
   search/trunk/src/java/org/hibernate/search/filter/FilterKey.java
Log:
Clarify the thread safety of FilterKey

Modified: search/trunk/src/java/org/hibernate/search/filter/FilterCachingStrategy.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/filter/FilterCachingStrategy.java	2008-07-04 16:09:05 UTC (rev 14877)
+++ search/trunk/src/java/org/hibernate/search/filter/FilterCachingStrategy.java	2008-07-05 17:01:12 UTC (rev 14878)
@@ -7,6 +7,7 @@
 
 /**
  * Defines the caching filter strategy
+ * implementations of getCachedFilter and addCachedFilter must be thread-safe 
  *
  * @author Emmanuel Bernard
  */

Modified: search/trunk/src/java/org/hibernate/search/filter/FilterKey.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/filter/FilterKey.java	2008-07-04 16:09:05 UTC (rev 14877)
+++ search/trunk/src/java/org/hibernate/search/filter/FilterKey.java	2008-07-05 17:01:12 UTC (rev 14878)
@@ -4,13 +4,16 @@
 /**
  * The key object must implement equals / hashcode so that 2 keys are equals if and only if
  * the given Filter types are the same and the set of parameters are the same.
- *
+ * <p/>
  * The FilterKey creator (ie the @Key method) does not have to inject <code>impl</code>
  * It will be done by Hibernate Search
  *
  * @author Emmanuel Bernard
  */
 public abstract class FilterKey {
+	 // FilterKey implementations do not have to be thread-safe as FilterCachingStrategy ensure
+	 // a memory barrier between usages
+	 //
 
 	private Class impl;
 




More information about the hibernate-commits mailing list