Class ReaperElement
java.lang.Object
com.arjuna.ats.internal.arjuna.coordinator.ReaperElement
- All Implemented Interfaces:
Comparable<ReaperElement>
-
Field Summary
Modifier and TypeFieldDescriptionfinal Reapable
int
int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
status of a reaper element which has been queued for stack trace capture by a reaper worker.static final int
-
Constructor Summary
ConstructorDescriptionReaperElement
(Reapable control, int cancelIntervalSeconds) ReaperElement
(Reapable control, int cancelIntervalSeconds, long traceGracePeriodMills) -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(ReaperElement other) Order by absoluteTimeout first, then by Uid.boolean
long
Returns the absolute time of the next status check, in millisecondslong
Returns the absolute time of the transaction expiry, in millisecondsint
hashCode()
void
setNextCheckAbsoluteMillis
(long nextCheckAbsoluteMillis) Sets the absolute time of the next status check (i.e.final String
toString()
-
Field Details
-
_control
-
_timeout
public int _timeout -
_status
public int _status -
_worker
-
RUN
public static final int RUN- See Also:
-
SCHEDULE_CANCEL
public static final int SCHEDULE_CANCEL- See Also:
-
CANCEL
public static final int CANCEL- See Also:
-
CANCEL_INTERRUPTED
public static final int CANCEL_INTERRUPTED- See Also:
-
FAIL
public static final int FAIL- See Also:
-
COMPLETE
public static final int COMPLETE- See Also:
-
ZOMBIE
public static final int ZOMBIE- See Also:
-
TRACE
public static final int TRACEstatus of a reaper element which has been queued for stack trace capture by a reaper worker.- See Also:
-
-
Constructor Details
-
ReaperElement
-
ReaperElement
-
-
Method Details
-
toString
-
compareTo
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 interfaceComparable<ReaperElement>
- Parameters:
other
- the ReaperElement to compare- Returns:
- 0 if equal, 1 if this is greater, -1 if this is smaller
-
equals
-
hashCode
public int hashCode() -
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
-