private MongoDBRiverBulkProcessor getBulkProcessor(String index, String type) { SimpleEntry<String, String> entry = new SimpleEntry<String, String>(index, type); if (!processors.containsKey(entry)) { processors.put(new SimpleEntry<String, String>(index, type), new MongoDBRiverBulkProcessor.Builder(river, definition, esClient, index, type).build()); } return processors.get(entry); }