-
Notifications
You must be signed in to change notification settings - Fork 532
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1585 from lukas-krecan/spotless
Add Spotless linter
- Loading branch information
Showing
277 changed files
with
4,676 additions
and
5,255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 24 additions & 17 deletions
41
cdi/shedlock-cdi-vintage/src/main/java/net/javacrumbs/shedlock/cdi/SchedulerLock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,45 @@ | ||
package net.javacrumbs.shedlock.cdi; | ||
|
||
import javax.enterprise.util.Nonbinding; | ||
import javax.interceptor.InterceptorBinding; | ||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Inherited; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
import javax.enterprise.util.Nonbinding; | ||
import javax.interceptor.InterceptorBinding; | ||
|
||
@InterceptorBinding | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ElementType.TYPE, ElementType.METHOD}) | ||
@Inherited | ||
public @interface SchedulerLock { | ||
/** | ||
* Lock name. | ||
*/ | ||
@Nonbinding String name(); | ||
/** Lock name. */ | ||
@Nonbinding | ||
String name(); | ||
|
||
/** | ||
* How long 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. Can be any format | ||
* supported by <a href="https://docs.micronaut.io/latest/guide/config.html#_duration_conversion">Duration Conversion</a> | ||
* How long 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. Can be any format supported | ||
* by <a href= | ||
* "https://docs.micronaut.io/latest/guide/config.html#_duration_conversion">Duration | ||
* Conversion</a> | ||
* | ||
* <p> | ||
*/ | ||
@Nonbinding String lockAtMostFor() default ""; | ||
@Nonbinding | ||
String lockAtMostFor() default ""; | ||
|
||
/** | ||
* The lock will be held at least for this period of time. 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. Can be any format | ||
* supported by <a href="https://docs.micronaut.io/latest/guide/config.html#_duration_conversion">Duration Conversion</a> | ||
* The lock will be held at least for this period of time. 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. Can be any format supported by <a href= | ||
* "https://docs.micronaut.io/latest/guide/config.html#_duration_conversion">Duration | ||
* Conversion</a> | ||
*/ | ||
@Nonbinding String lockAtLeastFor() default ""; | ||
@Nonbinding | ||
String lockAtLeastFor() default ""; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 6 additions & 8 deletions
14
...tage/src/main/java/net/javacrumbs/shedlock/cdi/internal/LockingNotSupportedException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.