Package com.ticxo.modelengine.api.utils
Class RaceConditionUtil
java.lang.Object
com.ticxo.modelengine.api.utils.RaceConditionUtil
For the love of god someone please figure out
how to fix anything that uses this class. :sadge:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Try executing the runnable.static void
Try executing the runnable.static void
Try executing the runnable.static void
wrapConmod
(Runnable runnable) Try executing the runnable.static void
wrapConmod
(Runnable runnable, long delay) Try executing the runnable.static void
wrapConmod
(Runnable runnable, long delay, int attempts) Try executing the runnable.
-
Constructor Details
-
RaceConditionUtil
public RaceConditionUtil()
-
-
Method Details
-
wrapConmod
Try executing the runnable. If a concurrent modification error occur, delay 1 tick and retry. -
wrapConmod
Try executing the runnable. If a concurrent modification error occur, delay and retry.- Parameters:
runnable
- method executeddelay
- delay in tick
-
wrapConmod
Try executing the runnable. If a concurrent modification error occur, delay and retry until running out of attempts.- Parameters:
runnable
- method executeddelay
- delay in tickattempts
- attempts before giving up execution
-
wrapAll
Try executing the runnable. If an error occur, delay 1 tick and retry. -
wrapAll
Try executing the runnable. If an error occur, delay and retry.- Parameters:
runnable
- method executeddelay
- delay in tick
-
wrapAll
Try executing the runnable. If an error occur, delay and retry until running out of attempts.- Parameters:
runnable
- method executeddelay
- delay in tickattempts
- attempts before giving up execution
-