Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Suspendable
- void fiberBlockingIndex(IndexRequest indexRequest) throws Exception {
- new IndexAsync(elasticsearchClient, indexRequest, RequestOptions.DEFAULT) {
- protected void requestAsync() {
- elasticsearchClient.getClient().indexAsync(indexRequest, RequestOptions.DEFAULT, this);
- }
- }.run(1000, TimeUnit.MILLISECONDS);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement