Author: clebert.suconic(a)jboss.com
Date: 2009-11-23 22:50:27 -0500 (Mon, 23 Nov 2009)
New Revision: 8391
Modified:
trunk/src/main/org/hornetq/core/persistence/impl/journal/OperationContextImpl.java
trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
Log:
Tweaks
Modified:
trunk/src/main/org/hornetq/core/persistence/impl/journal/OperationContextImpl.java
===================================================================
---
trunk/src/main/org/hornetq/core/persistence/impl/journal/OperationContextImpl.java 2009-11-24
03:26:19 UTC (rev 8390)
+++
trunk/src/main/org/hornetq/core/persistence/impl/journal/OperationContextImpl.java 2009-11-24
03:50:27 UTC (rev 8391)
@@ -25,9 +25,15 @@
/**
*
- * This class will hold operations when there are IO operations...
- * and it will
+ * Each instance of OperationContextImpl is associated with an executor (usually an
ordered Executor).
*
+ * Tasks are hold until the operations are complete and executed in the natural order as
soon as the operations are returned
+ * from replication and storage.
+ *
+ * If there are no pending IO operations, the tasks are just executed at the callers
thread without any context switch.
+ *
+ * So, if you are doing operations that are not dependent on IO (e.g
NonPersistentMessages) you wouldn't have any context switch.
+ *
* @author <mailto:clebert.suconic@jboss.org">Clebert Suconic</a>
*/
public class OperationContextImpl implements OperationContext
Modified: trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
===================================================================
---
trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java 2009-11-24
03:26:19 UTC (rev 8390)
+++
trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java 2009-11-24
03:50:27 UTC (rev 8391)
@@ -26,7 +26,6 @@
import org.hornetq.core.logging.Logger;
import org.hornetq.core.paging.PagedMessage;
import org.hornetq.core.persistence.OperationContext;
-import org.hornetq.core.persistence.StorageManager;
import org.hornetq.core.persistence.impl.journal.OperationContextImpl;
import org.hornetq.core.remoting.Channel;
import org.hornetq.core.remoting.ChannelHandler;