Java Mailing List Archive

http://www.gg3721.com/

Home » Hibernate Commits List »

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

hibernate-commits

2008-07-05


Author LoginPost Reply
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)
@@(protected) @@

/**
* 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)
@@(protected) @@
/**
* 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;


_______________________________________________
hibernate-commits mailing list
hibernate-commits@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-commits
©2008 gg3721.com - Jax Systems, LLC, U.S.A.