Class RecoveryXids
java.lang.Object
com.arjuna.ats.internal.jta.recovery.arjunacore.RecoveryXids
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
isEmpty()
final boolean
isSameRM
(NameScopedXAResource xares) boolean
isStale()
final void
Update our tracking with results of a new recovery scan passboolean
static void
setSafetyIntervalMillis
(int safetyIntervalMillis) Setting up the safety interval millis.int
size()
final Xid[]
Return any Xids that should be considered for recovery.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.
-
Constructor Details
-
RecoveryXids
-
-
Method Details
-
equals
-
nextScan
Update our tracking with results of a new recovery scan pass- Parameters:
trans
- the Xids seen during the new scan.
-
toRecover
Return any Xids that should be considered for recovery.- Returns:
- Xids that are old enough to be eligible for recovery.
-
isSameRM
-
contains
-
isStale
public boolean isStale() -
remove
-
isEmpty
public boolean isEmpty() -
updateIfEquivalentRM
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 of20_000
milliseconds is used.- Parameters:
safetyIntervalMillis
- number of milliseconds after the record is declared to be stale
-