Author: epbernard
Date: 2008-01-26 17:24:18 -0500 (Sat, 26 Jan 2008)
New Revision: 14291
Modified:
search/trunk/src/java/org/hibernate/search/backend/Worker.java
search/trunk/src/java/org/hibernate/search/backend/impl/TransactionalWorker.java
Log:
Style
Modified: search/trunk/src/java/org/hibernate/search/backend/Worker.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/backend/Worker.java 2008-01-25 02:34:41 UTC
(rev 14290)
+++ search/trunk/src/java/org/hibernate/search/backend/Worker.java 2008-01-26 22:24:18 UTC
(rev 14291)
@@ -2,16 +2,18 @@
package org.hibernate.search.backend;
import java.util.Properties;
-import java.io.Serializable;
+import org.hibernate.engine.SessionImplementor;
+import org.hibernate.search.engine.SearchFactoryImplementor;
import org.hibernate.event.EventSource;
-import org.hibernate.search.engine.SearchFactoryImplementor;
/**
* Perform work for a given session. This implementation has to be multi threaded
* @author Emmanuel Bernard
*/
public interface Worker {
+ //Use of EventSource since it's the common subinterface for Session and
SessionImplementor
+ //the alternative would have been to do a subcasting or to retrieve 2 parameters :(
void performWork(Work work, EventSource session);
void initialize(Properties props, SearchFactoryImplementor searchFactoryImplementor);
Modified:
search/trunk/src/java/org/hibernate/search/backend/impl/TransactionalWorker.java
===================================================================
---
search/trunk/src/java/org/hibernate/search/backend/impl/TransactionalWorker.java 2008-01-25
02:34:41 UTC (rev 14290)
+++
search/trunk/src/java/org/hibernate/search/backend/impl/TransactionalWorker.java 2008-01-26
22:24:18 UTC (rev 14291)
@@ -2,18 +2,15 @@
package org.hibernate.search.backend.impl;
import java.util.Properties;
-import java.io.Serializable;
-import org.hibernate.search.backend.Worker;
+import org.hibernate.Transaction;
+import org.hibernate.event.EventSource;
import org.hibernate.search.backend.QueueingProcessor;
-import org.hibernate.search.backend.WorkType;
-import org.hibernate.search.backend.WorkQueue;
import org.hibernate.search.backend.Work;
-import org.hibernate.search.backend.impl.BatchedQueueingProcessor;
-import org.hibernate.search.util.WeakIdentityHashMap;
+import org.hibernate.search.backend.WorkQueue;
+import org.hibernate.search.backend.Worker;
import org.hibernate.search.engine.SearchFactoryImplementor;
-import org.hibernate.event.EventSource;
-import org.hibernate.Transaction;
+import org.hibernate.search.util.WeakIdentityHashMap;
/**
* Queue works per transaction.
Show replies by date