Skip to content
Merged
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 @@ -130,18 +130,31 @@ private BulkIngester(Builder<Context> builder) {

//----- Getters

/**
* The configured max operations to buffer in a single bulk request.
*/
public int maxOperations() {
return this.maxOperations;
}

/**
* The configured maximum size in bytes for a bulk request. Operations are added to the request until
* adding an operation leads the request to exceed this siz.
*/
public long maxSize() {
return this.maxSize;
}

/**
* The configured maximum number of concurrent request sent to Elasticsearch.
*/
public int maxConcurrentRequests() {
return this.maxRequests;
}

/**
* The configured flush period.
*/
public Duration flushInterval() {
if (this.flushIntervalMillis != null) {
return Duration.ofMillis(flushIntervalMillis);
Expand All @@ -150,6 +163,29 @@ public Duration flushInterval() {
}
}

/**
* The number of operations that have been buffered, waiting to be sent.
*/
public int pendingOperations() {
List<BulkOperation> operations = this.operations;
return operations == null ? 0 : operations.size();
}

/**
* The size in bytes of operations that have been buffered, waiting to be sent.
*/
public long pendingOperationsSize() {
return this.currentSize;
}


/**
* The number of in flight bulk requests.
*/
public int pendingRequests() {
return this.requestsInFlightCount;
}

//----- Statistics

/**
Expand Down