java.lang.Object
com.arjuna.ats.internal.jta.recovery.arjunacore.RecoveryXids

public class RecoveryXids extends Object
  • Constructor Details

  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • nextScan

      public final void nextScan(Xid[] trans)
      Update our tracking with results of a new recovery scan pass
      Parameters:
      trans - the Xids seen during the new scan.
    • toRecover

      public final Xid[] toRecover()
      Return any Xids that should be considered for recovery.
      Returns:
      Xids that are old enough to be eligible for recovery.
    • isSameRM

      public final boolean isSameRM(NameScopedXAResource xares)
    • contains

      public boolean contains(Xid xid)
    • isStale

      public boolean isStale()
    • remove

      public boolean remove(Xid xid)
    • isEmpty

      public boolean isEmpty()
    • updateIfEquivalentRM

      public boolean updateIfEquivalentRM(NameScopedXAResource xaResource, Xid[] xids)
      Heuristically determine is the supplied xaResource is from the same origin as ours and if so, replace the existing resource with the supplied one. This deals with cases where a recovery plugin supplies a new resource on each call.
      Parameters:
      xaResource - an xaResource which may or may not be from the same orgin as ours.
      xids - The list of xids returned by a recovery scan of the supplied resource.
      Returns:
      true if the supplied xaResource is from the same origin as the one we previously held.
    • size

      public int size()
    • setSafetyIntervalMillis

      public static void setSafetyIntervalMillis(int safetyIntervalMillis)
      Setting up the safety interval millis. The value defines what time has to elapse for the participant record being considered as stale. When value is set lower than 0 then default value of 20_000 milliseconds is used.
      Parameters:
      safetyIntervalMillis - number of milliseconds after the record is declared to be stale