rishabhdaim commented on code in PR #2842:
URL: https://github.com/apache/jackrabbit-oak/pull/2842#discussion_r3068077188


##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexStatistics.java:
##########
@@ -241,25 +212,13 @@ private int count(StatsRequestDescriptor crd) throws 
IOException {
         }
     }
 
-    static class StatsCacheLoader extends CacheLoader<StatsRequestDescriptor, 
StatsResponse> {
+    static class StatsCacheLoader implements 
CacheLoader<StatsRequestDescriptor, StatsResponse> {
 
         @Override
         public @NotNull StatsResponse load(@NotNull StatsRequestDescriptor 
countRequestDescriptor) throws IOException {
             return stats(countRequestDescriptor);
         }
 
-        @Override
-        public @NotNull ListenableFuture<StatsResponse> reload(@NotNull 
StatsRequestDescriptor crd, @NotNull StatsResponse oldValue) {
-            CompletableFuture<StatsResponse> task = 
CompletableFuture.supplyAsync(() -> {
-                try {
-                    return stats(crd);
-                } catch (IOException e) {
-                    throw new CompletionException(e);
-                }
-            }, REFRESH_EXECUTOR);
-            return FutureConverter.toListenableFuture(task);
-        }
-

Review Comment:
   no need for caffeine cache.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to