Permalink
Browse files

minor cleanup for timer ordering in connection manager, added and upd…

…ated javadoc
  • Loading branch information...
1 parent 134e65e commit c288840ba9b2859bb36075510c06d519aca6124f zznate committed Jan 30, 2012
@@ -306,10 +306,10 @@ public void operateWithFailover(Operation<?> op) throws HectorException {
op.setExecutionStatus(success);
timer.stop(op, timerToken);
releaseClient(client);
+ timerTracker.processTimerToken(timerToken);
if ( retryable ) {
timerToken = timer.start();
}
- timerTracker.processTimerToken(timerToken);
}
}
}
@@ -3,14 +3,14 @@
import me.prettyprint.cassandra.service.Operation;
/**
- * Timer For Cassandra operations
+ * Control the life cyle of the HOpTimer
*/
public interface HOpTimer {
/**
* Start timing an operation.
*
- * @return - a token that will be returned to the timer when stop(...) in
+ * @return - a token that will be returned to the timer when stop(...) is
* invoked
*/
TimerToken start();
@@ -4,7 +4,10 @@
import me.prettyprint.cassandra.service.Operation;
/**
- * Hold execution information about an individual op timing event
+ * Hold execution information about an individual op timing event. TimerToken impls
+ * will populate their state information when {@link #stop(me.prettyprint.cassandra.service.Operation)}
+ * is invoked.
+ *
* @author zznate
*/
public interface TimerToken {
@@ -0,0 +1,20 @@
+package me.prettyprint.cassandra.service;
+
+import java.io.Serializable;
+
+import me.prettyprint.cassandra.connection.TimerToken;
+
+/**
+ * @author zznate
+ */
+public class Speed4jTimerTracker implements HOpTimerTracker, Serializable {
+
+ /**
+ * Speed4J handles execution and logging logic internally so this is a no-op
+ * @param timerToken
+ */
+ @Override
+ public void processTimerToken(TimerToken timerToken) {
+
+ }
+}

0 comments on commit c288840

Please sign in to comment.