Annotation Type SchedulerLock


@Target({METHOD,ANNOTATION_TYPE}) @Retention(RUNTIME) @Deprecated public @interface SchedulerLock
Deprecated.
This annotation has been replaced by 'net.javacrumbs.shedlock.spring.annotation.SchedulerLock' I am really sorry to do such a step, but this annotation is in wrong module and stands in way of non-spring integrations. This class will not be removed before 2022.
Marks locked method
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    long
    Deprecated.
    The lock will be held at least for X millis.
    Deprecated.
    Lock at least for as string.
    long
    Deprecated.
    How long (in ms) the lock should be kept in case the machine which obtained the lock died before releasing it.
    Deprecated.
    Lock at most for as string.
    Deprecated.
    Lock name.
  • Element Details

    • name

      String name
      Deprecated.
      Lock name.
      Default:
      ""
    • lockAtMostFor

      long lockAtMostFor
      Deprecated.
      How long (in ms) the lock should be kept in case the machine which obtained the lock died before releasing it. This is just a fallback, under normal circumstances the lock is released as soon the tasks finishes. Negative value means default Ignored when using ZooKeeper and other lock providers which are able to detect dead node.
      Default:
      -1L
    • lockAtMostForString

      String lockAtMostForString
      Deprecated.
      Lock at most for as string. Can be either number in ms or formatted as described in Duration.parse(CharSequence)
      Default:
      ""
    • lockAtLeastFor

      long lockAtLeastFor
      Deprecated.
      The lock will be held at least for X millis. Can be used if you really need to execute the task at most once in given period of time. If the duration of the task is shorter than clock difference between nodes, the task can be theoretically executed more than once (one node after another). By setting this parameter, you can make sure that the lock will be kept at least for given period of time.
      Default:
      -1L
    • lockAtLeastForString

      String lockAtLeastForString
      Deprecated.
      Lock at least for as string. Can be either number in ms or formatted as described in Duration.parse(CharSequence)
      Default:
      ""