Package net.javacrumbs.shedlock.core
Annotation Type 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 ElementsModifier and TypeOptional ElementDescriptionlong
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 nameDeprecated.Lock name.- Default:
- ""
-
lockAtMostFor
long lockAtMostForDeprecated.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 lockAtMostForStringDeprecated.Lock at most for as string. Can be either number in ms or formatted as described inDuration.parse(CharSequence)
- Default:
- ""
-
lockAtLeastFor
long lockAtLeastForDeprecated.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 lockAtLeastForStringDeprecated.Lock at least for as string. Can be either number in ms or formatted as described inDuration.parse(CharSequence)
- Default:
- ""
-