smiroslav commented on a change in pull request #309:
URL: https://github.com/apache/jackrabbit-oak/pull/309#discussion_r662902672
##########
File path:
oak-segment-remote/src/main/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/PersistentDiskCache.java
##########
@@ -63,15 +63,10 @@
final AtomicLong evictionCount = new AtomicLong();
- private static final Comparator<Path> sortedByAccessTime = (path1, path2)
-> {
- try {
- FileTime lastAccessFile1 = Files.readAttributes(path1,
BasicFileAttributes.class).lastAccessTime();
- FileTime lastAccessFile2 = Files.readAttributes(path2,
BasicFileAttributes.class).lastAccessTime();
- return lastAccessFile1.compareTo(lastAccessFile2);
- } catch (IOException e) {
- logger.error("A problem occurred while cleaning up the cache: ",
e);
- }
- return 0;
+ private static final Comparator<SegmentCacheEntry> sortedByAccessTime =
(segmentCacheEntry1, segmentCacheEntry2) -> {
Review comment:
Good suggestion, thanks!
--
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]