@Test public void shouldNotWriteWhenNoTransactionIsActiveAndNoItem() throws Exception { writer.write(null); verifyZeroInteractions(elasticsearchOperations); writer.write(new ArrayList<IndexQuery>(0)); verifyZeroInteractions(elasticsearchOperations); }
@Override public void write(List<? extends IndexQuery> items) throws Exception { if(isActualTransactionActive()) { addToBuffer(items); }else { writeItems(items); } }
ElasticsearchItemWriter implements ItemWriter<IndexQuery>, InitializingBean { @Override public void write(List<? extends IndexQuery> items) throws Exception { if(isActualTransactionActive()) { addToBuffer(items); }else { writeItems(items); } } }
ElasticsearchItemWriter implements ItemWriter<IndexQuery>, InitializingBean { @Override public void write(List<? extends IndexQuery> items) throws Exception { if(isActualTransactionActive()) { addToBuffer(items); }else { writeItems(items); } } ElasticsearchItemWriter(ElasticsearchOperations elasticsearchOperations); }
ElasticsearchItemWriter implements ItemWriter<IndexQuery>, InitializingBean { @Override public void write(List<? extends IndexQuery> items) throws Exception { if(isActualTransactionActive()) { addToBuffer(items); }else { writeItems(items); } } ElasticsearchItemWriter(ElasticsearchOperations elasticsearchOperations); void setDelete(boolean delete); @Override void afterPropertiesSet(); @Override void write(List<? extends IndexQuery> items); }
ElasticsearchItemWriter implements ItemWriter<IndexQuery>, InitializingBean { @Override public void write(List<? extends IndexQuery> items) throws Exception { if(isActualTransactionActive()) { addToBuffer(items); }else { writeItems(items); } } ElasticsearchItemWriter(ElasticsearchOperations elasticsearchOperations); void setDelete(boolean delete); @Override void afterPropertiesSet(); @Override void write(List<? extends IndexQuery> items);  }