Skip to content

Commit 747b243

Browse files
committed
Add javadoc to freeRegionCount
1 parent 2e5c0b0 commit 747b243

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

x-pack/plugin/blob-cache/src/main/java/org/elasticsearch/blobcache/shared/SharedBlobCacheService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,11 @@ private static void throwAlreadyClosed(String message) {
672672
throw new AlreadyClosedException(message);
673673
}
674674

675-
// used by tests
675+
/**
676+
* NOTE: Method is package private mostly to allow checking the number of fee regions in tests.
677+
* However, it is also used by {@link SharedBlobCacheService#maybeFetchFullEntry} but we should try
678+
* to move away from that because calling "size" on a ConcurrentLinkedQueue is not a constant time operation.
679+
*/
676680
int freeRegionCount() {
677681
return freeRegions.size();
678682
}

0 commit comments

Comments
 (0)