[jboss-svn-commits] JBL Code SVN: r10450 - labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Mar 22 15:26:25 EDT 2007
Author: mark.little at jboss.com
Date: 2007-03-22 15:26:25 -0400 (Thu, 22 Mar 2007)
New Revision: 10450
Modified:
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperElement.java
Log:
tidy-up.
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperElement.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperElement.java 2007-03-22 18:59:31 UTC (rev 10449)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperElement.java 2007-03-22 19:26:25 UTC (rev 10450)
@@ -35,7 +35,6 @@
import com.arjuna.ats.arjuna.logging.tsLogger;
import com.arjuna.ats.arjuna.coordinator.Reapable;
-import com.arjuna.ats.arjuna.coordinator.ActionStatus;
import com.arjuna.ats.arjuna.logging.FacilityCode;
import com.arjuna.ats.internal.arjuna.template.OrderedListElement;
@@ -43,91 +42,94 @@
public class ReaperElement implements OrderedListElement
{
- /*
- * Currently, once created the reaper object and thread stay around
- * forever.
- * We could destroy both once the list of transactions is null. Depends
- * upon the relative cost of recreating them over keeping them around.
- */
+ /*
+ * Currently, once created the reaper object and thread stay around forever.
+ * We could destroy both once the list of transactions is null. Depends upon
+ * the relative cost of recreating them over keeping them around.
+ */
-
-public ReaperElement (Reapable control, int timeout)
- {
- if (tsLogger.arjLogger.debugAllowed())
+ public ReaperElement(Reapable control, int timeout)
{
- tsLogger.arjLogger.debug(DebugLevel.CONSTRUCTORS, VisibilityLevel.VIS_PUBLIC,
- FacilityCode.FAC_ATOMIC_ACTION, "ReaperElement::ReaperElement ( "+control+", "+timeout+" )");
- }
+ if (tsLogger.arjLogger.debugAllowed())
+ {
+ tsLogger.arjLogger.debug(DebugLevel.CONSTRUCTORS,
+ VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_ATOMIC_ACTION,
+ "ReaperElement::ReaperElement ( " + control + ", "
+ + timeout + " )");
+ }
- _control = control;
- _timeout = timeout;
+ _control = control;
+ _timeout = timeout;
- /*
- * Given a timeout period in seconds, calculate its absolute value
- * from the current time of day in milliseconds.
- */
-
- _absoluteTimeout = timeout*1000 + System.currentTimeMillis();
- }
+ /*
+ * Given a timeout period in seconds, calculate its absolute value from
+ * the current time of day in milliseconds.
+ */
-public void finalize ()
- {
- if (tsLogger.arjLogger.debugAllowed())
+ _absoluteTimeout = timeout * 1000 + System.currentTimeMillis();
+ }
+
+ public void finalize()
{
- tsLogger.arjLogger.debug(DebugLevel.DESTRUCTORS, VisibilityLevel.VIS_PUBLIC,
- FacilityCode.FAC_ATOMIC_ACTION, "ReaperElement.finalize ()");
+ if (tsLogger.arjLogger.debugAllowed())
+ {
+ tsLogger.arjLogger.debug(DebugLevel.DESTRUCTORS,
+ VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_ATOMIC_ACTION,
+ "ReaperElement.finalize ()");
+ }
+
+ _control = null;
}
-
- _control = null;
- }
-
-public final boolean equals (OrderedListElement e)
- {
- if (tsLogger.arjLogger.debugAllowed())
+
+ public final boolean equals(OrderedListElement e)
{
- tsLogger.arjLogger.debug(DebugLevel.OPERATORS, VisibilityLevel.VIS_PUBLIC,
- FacilityCode.FAC_ATOMIC_ACTION, "ReaperElement.equals ()");
+ if (tsLogger.arjLogger.debugAllowed())
+ {
+ tsLogger.arjLogger.debug(DebugLevel.OPERATORS,
+ VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_ATOMIC_ACTION,
+ "ReaperElement.equals ()");
+ }
+
+ if (e instanceof ReaperElement)
+ return (_absoluteTimeout == ((ReaperElement) e)._absoluteTimeout);
+ else
+ return false;
}
- if (e instanceof ReaperElement)
- return (_absoluteTimeout == ((ReaperElement) e)._absoluteTimeout);
- else
- return false;
- }
+ public final boolean lessThan(OrderedListElement e)
+ {
+ if (tsLogger.arjLogger.debugAllowed())
+ {
+ tsLogger.arjLogger.debug(DebugLevel.OPERATORS,
+ VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_ATOMIC_ACTION,
+ "ReaperElement.lessThan ()");
+ }
-public final boolean lessThan (OrderedListElement e)
- {
- if (tsLogger.arjLogger.debugAllowed())
- {
- tsLogger.arjLogger.debug(DebugLevel.OPERATORS, VisibilityLevel.VIS_PUBLIC,
- FacilityCode.FAC_ATOMIC_ACTION, "ReaperElement.lessThan ()");
+ if (e instanceof ReaperElement)
+ return (_absoluteTimeout < ((ReaperElement) e)._absoluteTimeout);
+ else
+ return false;
}
-
- if (e instanceof ReaperElement)
- return (_absoluteTimeout < ((ReaperElement)e)._absoluteTimeout);
- else
- return false;
- }
-public final boolean greaterThan (OrderedListElement e)
- {
- if (tsLogger.arjLogger.debugAllowed())
+ public final boolean greaterThan(OrderedListElement e)
{
- tsLogger.arjLogger.debug(DebugLevel.OPERATORS, VisibilityLevel.VIS_PUBLIC,
- FacilityCode.FAC_ATOMIC_ACTION, "ReaperElement.greaterThan ()");
+ if (tsLogger.arjLogger.debugAllowed())
+ {
+ tsLogger.arjLogger.debug(DebugLevel.OPERATORS,
+ VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_ATOMIC_ACTION,
+ "ReaperElement.greaterThan ()");
+ }
+
+ if (e instanceof ReaperElement)
+ return (_absoluteTimeout > ((ReaperElement) e)._absoluteTimeout);
+ else
+ return false;
}
-
- if (e instanceof ReaperElement)
- return (_absoluteTimeout > ((ReaperElement)e)._absoluteTimeout);
- else
- return false;
- }
- public Reapable _control;
- public long _absoluteTimeout;
- public int _timeout;
-
-}
+ public Reapable _control;
+ public long _absoluteTimeout;
+ public int _timeout;
+}
More information about the jboss-svn-commits
mailing list