void processBufferedRequests(RequestIndexer actualIndexer) {
		for (ActionRequest request : bufferedRequests) {
			if (request instanceof IndexRequest) {
				actualIndexer.add((IndexRequest) request);
			} else if (request instanceof DeleteRequest) {
				actualIndexer.add((DeleteRequest) request);
			} else if (request instanceof UpdateRequest) {
				actualIndexer.add((UpdateRequest) request);
			}
		}

		bufferedRequests.clear();
	}
Implementation of a {@link RequestIndexer} that buffers {@link ActionRequest ActionRequests}
before re-sending them to the Elasticsearch cluster upon request.
elasticsearch5-xh/elasticsearch5-xh-sink/src/main/java/org/apache/flink/streaming/connectors/elasticsearch/BufferingNoOpRequestIndexer.java