Class ReaperElement

java.lang.Object
com.arjuna.ats.internal.arjuna.coordinator.ReaperElement
All Implemented Interfaces:
Comparable<ReaperElement>

public class ReaperElement extends Object implements Comparable<ReaperElement>
  • Field Details

  • Constructor Details

    • ReaperElement

      public ReaperElement(Reapable control, int cancelIntervalSeconds)
    • ReaperElement

      public ReaperElement(Reapable control, int cancelIntervalSeconds, long traceGracePeriodMills)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(ReaperElement other)
      Order by absoluteTimeout first, then by Uid. This is required so that the set maintained by the TransactionReaper is in timeout order for efficient processing.
      Specified by:
      compareTo in interface Comparable<ReaperElement>
      Parameters:
      other - the ReaperElement to compare
      Returns:
      0 if equal, 1 if this is greater, -1 if this is smaller
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • statusName

      public final String statusName()
    • getNextCheckAbsoluteMillis

      public long getNextCheckAbsoluteMillis()
      Returns the absolute time of the next status check, in milliseconds
      Returns:
      The absolute wakeup time, in millis
    • setNextCheckAbsoluteMillis

      public void setNextCheckAbsoluteMillis(long nextCheckAbsoluteMillis)
      Sets the absolute time of the next status check (i.e. wakeup) for this element.
      Parameters:
      nextCheckAbsoluteMillis - value in milliseconds
    • getTransactionTimeoutAbsoluteMillis

      public long getTransactionTimeoutAbsoluteMillis()
      Returns the absolute time of the transaction expiry, in milliseconds
      Returns:
      The absolute timeout time, in millis