Package net.javacrumbs.shedlock.core
Class DefaultLockingTaskExecutor
- java.lang.Object
-
- net.javacrumbs.shedlock.core.DefaultLockingTaskExecutor
-
- All Implemented Interfaces:
LockingTaskExecutor
public class DefaultLockingTaskExecutor extends Object implements LockingTaskExecutor
DefaultLockingTaskExecutorimplementation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.javacrumbs.shedlock.core.LockingTaskExecutor
LockingTaskExecutor.Task, LockingTaskExecutor.TaskResult<T>, LockingTaskExecutor.TaskWithResult<T>
-
-
Constructor Summary
Constructors Constructor Description DefaultLockingTaskExecutor(@NotNull LockProvider lockProvider)
-
Method Summary
Modifier and Type Method Description voidexecuteWithLock(@NotNull Runnable task, @NotNull LockConfiguration lockConfig)Executes task if it's not already running.voidexecuteWithLock(@NotNull LockingTaskExecutor.Task task, @NotNull LockConfiguration lockConfig)<T> @NotNull LockingTaskExecutor.TaskResult<T>executeWithLock(@NotNull LockingTaskExecutor.TaskWithResult<T> task, @NotNull LockConfiguration lockConfig)Executes task.
-
-
-
Constructor Detail
-
DefaultLockingTaskExecutor
public DefaultLockingTaskExecutor(@NotNull @NotNull LockProvider lockProvider)
-
-
Method Detail
-
executeWithLock
public void executeWithLock(@NotNull @NotNull Runnable task, @NotNull @NotNull LockConfiguration lockConfig)Description copied from interface:LockingTaskExecutorExecutes task if it's not already running.- Specified by:
executeWithLockin interfaceLockingTaskExecutor
-
executeWithLock
public void executeWithLock(@NotNull @NotNull LockingTaskExecutor.Task task, @NotNull @NotNull LockConfiguration lockConfig) throws Throwable- Specified by:
executeWithLockin interfaceLockingTaskExecutor- Throws:
Throwable
-
executeWithLock
@NotNull public <T> @NotNull LockingTaskExecutor.TaskResult<T> executeWithLock(@NotNull @NotNull LockingTaskExecutor.TaskWithResult<T> task, @NotNull @NotNull LockConfiguration lockConfig) throws Throwable
Description copied from interface:LockingTaskExecutorExecutes task.- Specified by:
executeWithLockin interfaceLockingTaskExecutor- Throws:
Throwable
-
-