Class LockAssert

java.lang.Object
net.javacrumbs.shedlock.core.LockAssert

public class LockAssert
extends Object
Asserts lock presence. The Spring ecosystem is so complicated, so one can not be sure that the lock is applied. This class makes sure that the task is indeed locked.

If you use AOP with Kotlin, it does not have to work due to final methods, if you use TaskExecutor wrapper, it can be broken by Sleuth,.

  • Constructor Details

    • LockAssert

      public LockAssert()
  • Method Details

    • assertLocked

      public static void assertLocked()
      Throws an exception if the lock is not present.