@Override public AsyncBatchDelivery build() { if (clientObjectFactory == null) { throw new ConfigurationException("No Elasticsearch client factory [JestHttp|ElasticsearchBulkProcessor] provided for AsyncBatchDelivery"); } return new AsyncBatchDelivery(batchSize, deliveryInterval, clientObjectFactory, failoverPolicy, indexTemplate); }
public AsyncBatchDelivery(int batchSize, int deliveryInterval, ClientObjectFactory objectFactory, FailoverPolicy failoverPolicy, IndexTemplate indexTemplate) { this.batchOperations = objectFactory.createBatchOperations(); this.batchEmitter = createBatchEmitterServiceProvider() .createInstance( batchSize, deliveryInterval, objectFactory, failoverPolicy); this.indexTemplate = indexTemplate; this.objectFactory = objectFactory; }
public static Builder createTestBatchDeliveryBuilder() { return spy(AsyncBatchDelivery.newBuilder() .withBatchSize(TEST_BATCH_SIZE) .withDeliveryInterval(TEST_DELIVERY_INTERVAL) .withClientObjectFactory(createTestObjectFactoryBuilder().build())) .withFailoverPolicy(new NoopFailoverPolicy()) .withIndexTemplate(new IndexTemplate(TEST_INDEX_TEMPLATE, TEST_PATH)); }
public AsyncBatchDelivery(int batchSize, int deliveryInterval, ClientObjectFactory objectFactory, FailoverPolicy failoverPolicy, IndexTemplate indexTemplate) { this.batchOperations = objectFactory.createBatchOperations(); this.batchEmitter = createBatchEmitterServiceProvider() .createInstance( batchSize, deliveryInterval, objectFactory, failoverPolicy); this.indexTemplate = indexTemplate; this.objectFactory = objectFactory; }
@Override public AsyncBatchDelivery build() { if (clientObjectFactory == null) { throw new ConfigurationException("No Elasticsearch client factory [JestHttp|ElasticsearchBulkProcessor] provided for AsyncBatchDelivery"); } return new AsyncBatchDelivery(batchSize, deliveryInterval, clientObjectFactory, failoverPolicy, indexTemplate); }