Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Kiran Prakash <[email protected]>
  • Loading branch information
kiranprakash154 committed Mar 13, 2024
1 parent 3cb52d9 commit 1c022ff
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ private void cleanCache(double threshold) {
return;
}

for (Iterator<Key> iterator = cache.keys().iterator(); iterator.hasNext(); ) {
for (Iterator<Key> iterator = cache.keys().iterator(); iterator.hasNext();) {
Key key = iterator.next();
if (shouldRemoveKey(key, cleanupKeysFromOutdatedReaders, cleanupKeysFromClosedShards)) {
iterator.remove();
Expand All @@ -607,7 +607,11 @@ private void cleanCache(double threshold) {
* @param cleanupKeysFromClosedShards A set of CleanupKeys of a closed shard.
* @return true if the key should be removed, false otherwise.
*/
private synchronized boolean shouldRemoveKey(Key key, Set<CleanupKey> cleanupKeysFromOutdatedReaders, Set<Object> cleanupKeysFromClosedShards) {
private synchronized boolean shouldRemoveKey(
Key key,
Set<CleanupKey> cleanupKeysFromOutdatedReaders,
Set<Object> cleanupKeysFromClosedShards
) {
if (cleanupKeysFromClosedShards.contains(key.shardId)) {
return true;
} else {
Expand Down

0 comments on commit 1c022ff

Please sign in to comment.