File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed
src/main/java/org/nlpcn/jcoder/run/mvc/cache Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -71,27 +71,13 @@ public Object load(Args args) {
71
71
} else {
72
72
cache = CacheBuilder .newBuilder ().maximumSize (this .size ).refreshAfterWrite (time , TimeUnit .SECONDS ).build (new CacheLoader <Args , Object >() {
73
73
74
- private ListeningExecutorService executorService = MoreExecutors .listeningDecorator (Executors .newCachedThreadPool ());
75
-
76
74
public Object load (Args args ) {
77
75
return executeNoCache (args );
78
76
}
79
77
80
78
@ Override
81
79
public ListenableFuture <Object > reload (final Args args , Object oldValue ) {
82
- ListenableFuture <Object > result = ListenableFutureTask .create (new Callable <Object >() {
83
- public Object call () {
84
- return executeNoCache (args );
85
- }
86
- });
87
-
88
- result = executorService .submit (new Callable <Object >() {
89
- @ Override
90
- public Object call () {
91
- return executeNoCache (args );
92
- }
93
- });
94
- return result ;
80
+ return ListenableFutureTask .create (() -> executeNoCache (args ));
95
81
}
96
82
97
83
});
You can’t perform that action at this time.
0 commit comments