File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/main/java/com/longcoding/moon/helpers Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 77import redis .clients .jedis .Jedis ;
88import redis .clients .jedis .Transaction ;
99
10+ import java .io .Closeable ;
11+ import java .io .IOException ;
1012import java .util .LinkedHashMap ;
1113
1214/**
2022 */
2123@ Getter
2224@ EqualsAndHashCode
23- public class RedisValidator <T > {
25+ public class RedisValidator <T > implements DisposableBean , Closeable {
2426
2527 private Jedis jedis ;
2628 private Transaction jedisMulti ;
@@ -47,4 +49,13 @@ public RedisValidator(Jedis jedis) {
4749 */
4850 public void offerFutureMethodQueue (String className , T responseValue ) { futureMethodQueue .put (className , responseValue ); }
4951
52+ @ Override
53+ public void close () throws IOException {
54+ jedis .close ();
55+ }
56+
57+ @ Override
58+ public void destroy () throws Exception {
59+ jedis .close ();
60+ }
5061}
You can’t perform that action at this time.
0 commit comments