Package net.javacrumbs.shedlock.core
Class LockExtender
java.lang.Object
net.javacrumbs.shedlock.core.LockExtender
public final class LockExtender extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLockExtender.LockCanNotBeExtendedExceptionstatic classLockExtender.LockExtensionExceptionstatic classLockExtender.NoActiveLockException -
Method Summary
Modifier and Type Method Description static voidextendActiveLock(Duration lockAtMostFor, Duration lockAtLeastFor)Extends active lock.
-
Method Details
-
extendActiveLock
Extends active lock. Is based on a thread local variable so it might not work in case of async processing.- Throws:
LockExtender.LockCanNotBeExtendedException- when the lock can not be extended due to expired lockLockExtender.NoActiveLockException- when there is no active lock in the thread localUnsupportedOperationException- when the LockProvider does not support lock extension.
-