Class LockConfiguration

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

public class LockConfiguration
extends Object
Lock configuration.
  • Constructor Details

    • LockConfiguration

      @Deprecated public LockConfiguration​(String name, Duration lockAtMostFor, Duration lockAtLeastFor)
      Deprecated.
    • LockConfiguration

      @Deprecated public LockConfiguration​(String name, Instant lockAtMostUntil)
      Deprecated.
    • LockConfiguration

      @Deprecated public LockConfiguration​(String name, Instant lockAtMostUntil, Instant lockAtLeastUntil)
      Deprecated.
    • LockConfiguration

      public LockConfiguration​(Instant createdAt, String name, Duration lockAtMostFor, Duration lockAtLeastFor)
      Creates LockConfiguration. There are two types of lock providers. One that uses "db time" which requires relative values of lockAtMostFor and lockAtLeastFor (currently it's only JdbcTemplateLockProvider). Second type of lock provider uses absolute time calculated from `createdAt`.
      Parameters:
      createdAt -
      name -
      lockAtMostFor -
      lockAtLeastFor -
  • Method Details

    • getName

      public String getName()
    • getLockAtMostUntil

      public Instant getLockAtMostUntil()
    • getLockAtLeastUntil

      public Instant getLockAtLeastUntil()
    • getUnlockTime

      public Instant getUnlockTime()
      Returns either now or lockAtLeastUntil whichever is later.
    • getLockAtLeastFor

      public Duration getLockAtLeastFor()
    • getLockAtMostFor

      public Duration getLockAtMostFor()
    • toString

      public String toString()
      Overrides:
      toString in class Object