Class SkipLockedClaims
java.lang.Object
com.kingsrook.qqq.backend.core.jobs.store.SkipLockedClaims
Claims with SELECT ... FOR UPDATE SKIP LOCKED (spec section 2.13, item 5):
in one short transaction, lock candidate rows other claimers have not
locked, then claim them (the fenced conditional update still bumps
leaseVersion) and commit. Competing pods skip each other's rows instead of
racing for the same ones. Backends without it use conditional updates only.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceClaims the locked candidates inside the transaction. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Tclaim(String tableName, QQueryFilter filter, SkipLockedClaims.Claimer<T> claimer) Lock the filter's rows (skipping locked ones) and claim them, in one transaction (as the system user).static booleanisSupported(String tableName) Whether the table's backend supports FOR UPDATE SKIP LOCKED.
-
Method Details
-
isSupported
Whether the table's backend supports FOR UPDATE SKIP LOCKED. -
claim
public static <T> T claim(String tableName, QQueryFilter filter, SkipLockedClaims.Claimer<T> claimer) throws QException Lock the filter's rows (skipping locked ones) and claim them, in one transaction (as the system user).- Throws:
QException
-