cshannon commented on code in PR #4881:
URL: https://github.com/apache/accumulo/pull/4881#discussion_r1757655286
##########
server/monitor/src/main/java/org/apache/accumulo/monitor/util/logging/RecentLogs.java:
##########
@@ -38,52 +41,44 @@ public class RecentLogs {
private static final int MAX_LOGS = 50;
+ private final Cache<String,DedupedEvent> eventsCache =
+ Caffeine.newBuilder().maximumSize(MAX_LOGS).build();
+ private final ConcurrentMap<String,DedupedEvent> events =
eventsCache.asMap();
Review Comment:
Yeah I could do that to make it simpler. asMap() is a wrapped view and it
caches it
https://github.com/ben-manes/caffeine/blob/26899178496d72a15cb243e61b157115932f96eb/caffeine/src/main/java/com/github/benmanes/caffeine/cache/LocalAsyncCache.java#L641
So calling asMap() as needed is fine.
--
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]