public interface AsyncBulkWriter extends AutoCloseable
Methods of this interface all return completable futures that will
complete when the whole write operation completes.
| Modifier and Type | Method and Description |
|---|---|
default CompletableFuture<Void> |
writeAsync(Iterable<? extends Statement<?>> statements)
Executes the given iterable of write statements asynchronously.
|
CompletableFuture<Void> |
writeAsync(Iterable<? extends Statement<?>> statements,
Consumer<? super WriteResult> consumer)
Executes the given iterable of write statements asynchronously, notifying the given consumer of
every write result.
|
default CompletableFuture<Void> |
writeAsync(Publisher<? extends Statement<?>> statements)
Executes the given flow of write statements asynchronously.
|
CompletableFuture<Void> |
writeAsync(Publisher<? extends Statement<?>> statements,
Consumer<? super WriteResult> consumer)
Executes the given flow of write statements asynchronously, notifying the given consumer of
every write result.
|
CompletableFuture<WriteResult> |
writeAsync(Statement<?> statement)
Executes the given write statement asynchronously.
|
default CompletableFuture<Void> |
writeAsync(Stream<? extends Statement<?>> statements)
Executes the given stream of write statements asynchronously.
|
CompletableFuture<Void> |
writeAsync(Stream<? extends Statement<?>> statements,
Consumer<? super WriteResult> consumer)
Executes the given stream of write statements asynchronously, notifying the given consumer of
every write result.
|
default CompletableFuture<WriteResult> |
writeAsync(String statement)
Executes the given write statement asynchronously.
|
closedefault CompletableFuture<WriteResult> writeAsync(String statement) throws BulkExecutionException
statement - The statement to execute.completable future that will complete when the whole write
operation completes.BulkExecutionException - if the operation cannot complete normally.CompletableFuture<WriteResult> writeAsync(Statement<?> statement) throws BulkExecutionException
statement - The statement to execute.completable future that will complete when the whole write
operation completes.BulkExecutionException - if the operation cannot complete normally.default CompletableFuture<Void> writeAsync(Stream<? extends Statement<?>> statements) throws BulkExecutionException
This method operates in a "fire and forget" mode. If you need to consume write results,
consider using writeAsync(Stream, Consumer) instead.
statements - The statements to execute.completable future that will complete when the whole write
operation completes.BulkExecutionException - if the operation cannot complete normally.CompletableFuture<Void> writeAsync(Stream<? extends Statement<?>> statements, Consumer<? super WriteResult> consumer) throws BulkExecutionException
statements - The statements to execute.consumer - A consumer for write results.completable future that will complete when the whole write
operation completes.BulkExecutionException - if the operation cannot complete normally.default CompletableFuture<Void> writeAsync(Iterable<? extends Statement<?>> statements) throws BulkExecutionException
This method operates in a "fire and forget" mode. If you need to consume write results,
consider using writeAsync(Iterable, Consumer) instead.
statements - The statements to execute.completable future that will complete when the whole write
operation completes.BulkExecutionException - if the operation cannot complete normally.CompletableFuture<Void> writeAsync(Iterable<? extends Statement<?>> statements, Consumer<? super WriteResult> consumer) throws BulkExecutionException
statements - The statements to execute.consumer - A consumer for write results.completable future that will complete when the whole write
operation completes.BulkExecutionException - if the operation cannot complete normally.default CompletableFuture<Void> writeAsync(Publisher<? extends Statement<?>> statements) throws BulkExecutionException
This method operates in a "fire and forget" mode. If you need to consume write results,
consider using writeAsync(Publisher, Consumer) instead.
statements - The statements to execute.completable future that will complete when the whole write
operation completes.BulkExecutionException - if the operation cannot complete normally.CompletableFuture<Void> writeAsync(Publisher<? extends Statement<?>> statements, Consumer<? super WriteResult> consumer)
statements - The statements to execute.consumer - A consumer for write results.completable future that will complete when the whole write
operation completes.BulkExecutionException - if the operation cannot complete normally.Copyright © 2017–2021 DataStax. All rights reserved.