Skip to content

Commit 86da7fd

Browse files
committed
Some docs for the functional interface
1 parent c0bdf15 commit 86da7fd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server/src/main/java/org/elasticsearch/search/fetch/FetchPhase.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,12 @@ public String toString() {
516516

517517
@FunctionalInterface
518518
private interface MemoryUsageAccumulator {
519-
int apply(int i, boolean b);
519+
/**
520+
* Accumulates the provided bytes and returns the currently accumulated amount of bytes.
521+
* When the reset parameter is true it accumulates the provided bytes, returns the
522+
* accumulated amount but will also reset the local counter for the accumulated bytes.
523+
*/
524+
int apply(int bytes, boolean reset);
520525
}
521526

522527
/**

0 commit comments

Comments
 (0)