You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-integration-redis/src/test/java/org/springframework/integration/redis/util/RedisLockRegistryTests.java
+178-2Lines changed: 178 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2014-2019 the original author or authors.
2
+
* Copyright 2014-2021 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -24,10 +24,13 @@
24
24
25
25
importjava.util.Map;
26
26
importjava.util.Properties;
27
+
importjava.util.Queue;
27
28
importjava.util.UUID;
28
29
importjava.util.concurrent.CountDownLatch;
30
+
importjava.util.concurrent.ExecutorService;
29
31
importjava.util.concurrent.Executors;
30
32
importjava.util.concurrent.Future;
33
+
importjava.util.concurrent.LinkedBlockingQueue;
31
34
importjava.util.concurrent.TimeUnit;
32
35
importjava.util.concurrent.atomic.AtomicBoolean;
33
36
importjava.util.concurrent.locks.Lock;
@@ -51,6 +54,7 @@
51
54
* @author Konstantin Yakimov
52
55
* @author Artem Bilan
53
56
* @author Vedran Pavic
57
+
* @author Unseok Kim
54
58
*
55
59
* @since 4.0
56
60
*
@@ -435,9 +439,176 @@ public void testExpireNotChanged() throws Exception {
Copy file name to clipboardExpand all lines: src/reference/asciidoc/redis.adoc
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -883,3 +883,6 @@ However, the resources protected by such a lock may have been compromised, so su
883
883
You should set the expiry at a large enough value to prevent this condition, but set it low enough that the lock can be recovered after a server failure in a reasonable amount of time.
884
884
885
885
Starting with version 5.0, the `RedisLockRegistry` implements `ExpirableLockRegistry`, which removes locks last acquired more than `age` ago and that are not currently locked.
886
+
887
+
String with version 5.5.6, the `RedisLockRegistry` is support automatically clean up cache for redisLocks in `RedisLockRegistry.locks` via `RedisLockRegistry.setCapacity()`.
0 commit comments