Skip to content

Commit 01afa36

Browse files
committed
spring-projectsGH-3444: Add Custom TTL support for RedisLock, and JdbcLock
Fixes: spring-projects#3444 * Maintain document Signed-off-by: Eddie Cho <[email protected]>
1 parent 9b9ecbc commit 01afa36

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/reference/antora/modules/ROOT/pages/jdbc/lock-registry.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ And the `JdbcLockRegistry.JdbcLock.unlock()` method throws `ConcurrentModificati
6363
Starting with version 7.0, the `JdbcLock` implements `DistributedLock` interface to support the feature of customized time-to-live (TTL) for the lock status data.
6464
A `JdbcLock` can now be acquired using the `lock(Duration ttl)` or `tryLock(long time, TimeUnit unit, Duration ttl)` method, with a specified time-to-live (TTL) value.
6565
The `JdbcLockRegistry` now provides new `renewLock(Object lockKey, Duration ttl)` method, allowing you to renew the lock with a custom time-to-live value.
66+
The default time-to-live for all `JdbcLock` instances stored in the same `JdbcLockRegistry` can now be set by the new constructor `JdbcLockRegistry(LockRepository client, Duration expireAfter)`.
6667
The APIs of `LockRepository` and `DefaultLockRepository` are also modified to support the feature.
6768
[IMPORTANT]
6869
====

0 commit comments

Comments
 (0)