Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.apache.lucene.index.SortedDocValues;
import org.apache.lucene.index.SortedSetDocValues;
import org.apache.lucene.util.BytesRef;
import org.elasticsearch.common.breaker.CircuitBreakingException;
import org.elasticsearch.core.Nullable;
import org.elasticsearch.core.Releasable;
import org.elasticsearch.index.mapper.blockloader.docvalues.BlockDocValuesReader;
Expand Down Expand Up @@ -377,6 +378,13 @@ interface Docs {
* also a test implementation, but there may be no more other implementations.
*/
interface BlockFactory {
/**
* Adjust the circuit breaker with the given delta, if the delta is negative, the breaker will
* be adjusted without tripping.
* @throws CircuitBreakingException if the breaker was put above its limit
*/
void adjustBreaker(long delta) throws CircuitBreakingException;

/**
* Build a builder to load booleans as loaded from doc values. Doc values
* load booleans in sorted order.
Expand Down Expand Up @@ -486,6 +494,12 @@ interface BlockFactory {
*/
Block constantBytes(BytesRef value, int count);

/**
* Build a block that contains {@code value} repeated
* {@code count} times.
*/
Block constantInt(int value, int count);

/**
* Build a reader for reading {@link SortedDocValues}
*/
Expand Down
Loading