@@ -130,18 +130,31 @@ private BulkIngester(Builder<Context> builder) {
130
130
131
131
//----- Getters
132
132
133
+ /**
134
+ * The configured max operations to buffer in a single bulk request.
135
+ */
133
136
public int maxOperations () {
134
137
return this .maxOperations ;
135
138
}
136
139
140
+ /**
141
+ * The configured maximum size in bytes for a bulk request. Operations are added to the request until
142
+ * adding an operation leads the request to exceed this siz.
143
+ */
137
144
public long maxSize () {
138
145
return this .maxSize ;
139
146
}
140
147
148
+ /**
149
+ * The configured maximum number of concurrent request sent to Elasticsearch.
150
+ */
141
151
public int maxConcurrentRequests () {
142
152
return this .maxRequests ;
143
153
}
144
154
155
+ /**
156
+ * The configured flush period.
157
+ */
145
158
public Duration flushInterval () {
146
159
if (this .flushIntervalMillis != null ) {
147
160
return Duration .ofMillis (flushIntervalMillis );
@@ -150,6 +163,29 @@ public Duration flushInterval() {
150
163
}
151
164
}
152
165
166
+ /**
167
+ * The number of operations that have been buffered, waiting to be sent.
168
+ */
169
+ public int pendingOperations () {
170
+ List <BulkOperation > operations = this .operations ;
171
+ return operations == null ? 0 : operations .size ();
172
+ }
173
+
174
+ /**
175
+ * The size in bytes of operations that have been buffered, waiting to be sent.
176
+ */
177
+ public long pendingOperationsSize () {
178
+ return this .currentSize ;
179
+ }
180
+
181
+
182
+ /**
183
+ * The number of in flight bulk requests.
184
+ */
185
+ public int pendingRequests () {
186
+ return this .requestsInFlightCount ;
187
+ }
188
+
153
189
//----- Statistics
154
190
155
191
/**
0 commit comments