Class RaceConditionUtil

java.lang.Object
com.ticxo.modelengine.api.utils.RaceConditionUtil

public class RaceConditionUtil extends Object
For the love of god someone please figure out how to fix anything that uses this class. :sadge:
  • Constructor Details

    • RaceConditionUtil

      public RaceConditionUtil()
  • Method Details

    • wrapConmod

      public static void wrapConmod(Runnable runnable)
      Try executing the runnable. If a concurrent modification error occur, delay 1 tick and retry.
    • wrapConmod

      public static void wrapConmod(Runnable runnable, long delay)
      Try executing the runnable. If a concurrent modification error occur, delay and retry.
      Parameters:
      runnable - method executed
      delay - delay in tick
    • wrapConmod

      public static void wrapConmod(Runnable runnable, long delay, int attempts)
      Try executing the runnable. If a concurrent modification error occur, delay and retry until running out of attempts.
      Parameters:
      runnable - method executed
      delay - delay in tick
      attempts - attempts before giving up execution
    • wrapAll

      public static void wrapAll(Runnable runnable)
      Try executing the runnable. If an error occur, delay 1 tick and retry.
    • wrapAll

      public static void wrapAll(Runnable runnable, long delay)
      Try executing the runnable. If an error occur, delay and retry.
      Parameters:
      runnable - method executed
      delay - delay in tick
    • wrapAll

      public static void wrapAll(Runnable runnable, long delay, int attempts)
      Try executing the runnable. If an error occur, delay and retry until running out of attempts.
      Parameters:
      runnable - method executed
      delay - delay in tick
      attempts - attempts before giving up execution