public class DefaultReactorBulkExecutor extends AbstractBulkExecutor implements ReactorBulkExecutor
BulkExecutor using Reactor.failFast, listener, maxConcurrentRequests, rateLimiter, session| Constructor and Description |
|---|
DefaultReactorBulkExecutor(CqlSession session)
Creates a new instance using the given
CqlSession and using defaults for all
parameters. |
| Modifier and Type | Method and Description |
|---|---|
static DefaultReactorBulkExecutorBuilder |
builder(CqlSession session)
Creates a new builder of
DefaultReactorBulkExecutor instances. |
CompletableFuture<Void> |
readAsync(Iterable<? extends Statement<?>> statements,
Consumer<? super ReadResult> consumer)
Executes the given stream of read statements asynchronously, notifying the given consumer of
every read result.
|
CompletableFuture<Void> |
readAsync(Publisher<? extends Statement<?>> statements,
Consumer<? super ReadResult> consumer)
Executes the given iterable of read statements asynchronously, notifying the given consumer of
every read result.
|
CompletableFuture<Void> |
readAsync(Statement<?> statement,
Consumer<? super ReadResult> consumer)
Executes the given read statement asynchronously, notifying the given consumer of every read
result.
|
CompletableFuture<Void> |
readAsync(Stream<? extends Statement<?>> statements,
Consumer<? super ReadResult> consumer)
Executes the given stream of read statements asynchronously, notifying the given consumer of
every read result.
|
Flux<ReadResult> |
readReactive(Iterable<? extends Statement<?>> statements)
Executes the given iterable of read statements reactively.
|
Flux<ReadResult> |
readReactive(Publisher<? extends Statement<?>> statements)
Executes the given Flux of read statements reactively.
|
Flux<ReadResult> |
readReactive(Statement<?> statement)
Executes the given read statement reactively.
|
Flux<ReadResult> |
readReactive(Stream<? extends Statement<?>> statements)
Executes the given stream of read statements reactively.
|
Flux<ReadResult> |
readReactive(String statement)
Executes the given read statement reactively.
|
void |
readSync(Iterable<? extends Statement<?>> statements,
Consumer<? super ReadResult> consumer)
Executes the given stream of read statements synchronously, notifying the given consumer of
every read result.
|
void |
readSync(Stream<? extends Statement<?>> statements,
Consumer<? super ReadResult> consumer)
Executes the given stream of read statements synchronously, notifying the given consumer of
every read result.
|
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.
|
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.
|
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.
|
Flux<WriteResult> |
writeReactive(Iterable<? extends Statement<?>> statements)
Executes the given iterable of write statements reactively.
|
Flux<WriteResult> |
writeReactive(Publisher<? extends Statement<?>> statements)
Executes the given Flux of write statements reactively.
|
Mono<WriteResult> |
writeReactive(Statement<?> statement)
Executes the given write statement reactively.
|
Flux<WriteResult> |
writeReactive(Stream<? extends Statement<?>> statements)
Executes the given stream of write statements reactively.
|
void |
writeSync(Iterable<? extends Statement<?>> statements,
Consumer<? super WriteResult> consumer)
Executes the given iterable of write statements synchronously, notifying the given consumer of
every write result.
|
void |
writeSync(Stream<? extends Statement<?>> statements,
Consumer<? super WriteResult> consumer)
Executes the given stream of write statements synchronously, notifying the given consumer of
every write result.
|
closeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwriteReactivewriteSync, writeSyncreadSync, readSyncwriteSync, writeSync, writeSync, writeSyncreadSyncwriteAsync, writeAsync, writeAsync, writeAsyncreadAsyncclosepublic DefaultReactorBulkExecutor(CqlSession session)
CqlSession and using defaults for all
parameters.
If you need to customize your executor, use the builder method
instead.
session - the CqlSession to use.public static DefaultReactorBulkExecutorBuilder builder(CqlSession session)
DefaultReactorBulkExecutor instances.session - The CqlSession to use.public void writeSync(Stream<? extends Statement<?>> statements, Consumer<? super WriteResult> consumer) throws BulkExecutionException
SyncBulkWriterwriteSync in interface SyncBulkWriterstatements - The statements to execute.consumer - A consumer for write results.BulkExecutionException - if the operation cannot complete normally.public void writeSync(Iterable<? extends Statement<?>> statements, Consumer<? super WriteResult> consumer) throws BulkExecutionException
SyncBulkWriterwriteSync in interface SyncBulkWriterstatements - The statements to execute.consumer - A consumer for write results.BulkExecutionException - if the operation cannot complete normally.public CompletableFuture<WriteResult> writeAsync(Statement<?> statement)
AsyncBulkWriterwriteAsync in interface AsyncBulkWriterstatement - The statement to execute.completable future that will complete when the whole write
operation completes.public CompletableFuture<Void> writeAsync(Stream<? extends Statement<?>> statements, Consumer<? super WriteResult> consumer) throws BulkExecutionException
AsyncBulkWriterwriteAsync in interface AsyncBulkWriterstatements - 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.public CompletableFuture<Void> writeAsync(Iterable<? extends Statement<?>> statements, Consumer<? super WriteResult> consumer) throws BulkExecutionException
AsyncBulkWriterwriteAsync in interface AsyncBulkWriterstatements - 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.public CompletableFuture<Void> writeAsync(Publisher<? extends Statement<?>> statements, Consumer<? super WriteResult> consumer)
AsyncBulkWriterwriteAsync in interface AsyncBulkWriterstatements - The statements to execute.consumer - A consumer for write results.completable future that will complete when the whole write
operation completes.public Mono<WriteResult> writeReactive(Statement<?> statement)
ReactorBulkWriterwriteReactive in interface ReactiveBulkWriterwriteReactive in interface ReactorBulkWriterstatement - The statement to execute.Flux that will emit one single write result.public Flux<WriteResult> writeReactive(Stream<? extends Statement<?>> statements) throws BulkExecutionException
ReactorBulkWriterwriteReactive in interface ReactiveBulkWriterwriteReactive in interface ReactorBulkWriterstatements - The statements to execute.Flux of write results.BulkExecutionException - if the operation cannot complete normally.public Flux<WriteResult> writeReactive(Iterable<? extends Statement<?>> statements) throws BulkExecutionException
ReactorBulkWriterwriteReactive in interface ReactiveBulkWriterwriteReactive in interface ReactorBulkWriterstatements - The statements to execute.Flux of write results.BulkExecutionException - if the operation cannot complete normally.public Flux<WriteResult> writeReactive(Publisher<? extends Statement<?>> statements) throws BulkExecutionException
ReactorBulkWriterwriteReactive in interface ReactiveBulkWriterwriteReactive in interface ReactorBulkWriterstatements - The statements to execute.Flux of write results.BulkExecutionException - if the operation cannot complete normally.public void readSync(Stream<? extends Statement<?>> statements, Consumer<? super ReadResult> consumer) throws BulkExecutionException
SyncBulkReaderreadSync in interface SyncBulkReaderstatements - The statements to execute.consumer - A consumer for read results.BulkExecutionException - if the operation cannot complete normally.public CompletableFuture<Void> readAsync(Statement<?> statement, Consumer<? super ReadResult> consumer) throws BulkExecutionException
AsyncBulkReaderreadAsync in interface AsyncBulkReaderstatement - The statement to execute.consumer - A consumer for ReadResults.completable future that will complete when the whole read
operation completes.BulkExecutionException - if the operation cannot complete normally.public CompletableFuture<Void> readAsync(Stream<? extends Statement<?>> statements, Consumer<? super ReadResult> consumer) throws BulkExecutionException
AsyncBulkReaderreadAsync in interface AsyncBulkReaderstatements - The statements to execute.consumer - A consumer for ReadResults.completable future that will complete when the whole read
operation completes.BulkExecutionException - if the operation cannot complete normally.public void readSync(Iterable<? extends Statement<?>> statements, Consumer<? super ReadResult> consumer) throws BulkExecutionException
SyncBulkReaderreadSync in interface SyncBulkReaderstatements - The statements to execute.consumer - A consumer for read results.BulkExecutionException - if the operation cannot complete normally.public CompletableFuture<Void> readAsync(Iterable<? extends Statement<?>> statements, Consumer<? super ReadResult> consumer) throws BulkExecutionException
AsyncBulkReaderreadAsync in interface AsyncBulkReaderstatements - The statements to execute.consumer - A consumer for ReadResults.completable future that will complete when the whole read
operation completes.BulkExecutionException - if the operation cannot complete normally.public CompletableFuture<Void> readAsync(Publisher<? extends Statement<?>> statements, Consumer<? super ReadResult> consumer)
AsyncBulkReaderreadAsync in interface AsyncBulkReaderstatements - The statements to execute.consumer - A consumer for ReadResults.completable future that will complete when the whole read
operation completes.public Flux<ReadResult> readReactive(String statement) throws BulkExecutionException
ReactorBulkReaderreadReactive in interface ReactiveBulkReaderreadReactive in interface ReactorBulkReaderstatement - The statement to execute.Flux that will emit one single read result.BulkExecutionException - if the operation cannot complete normally.public Flux<ReadResult> readReactive(Statement<?> statement)
ReactorBulkReaderreadReactive in interface ReactiveBulkReaderreadReactive in interface ReactorBulkReaderstatement - The statement to execute.Flux that will emit one single read result.public Flux<ReadResult> readReactive(Stream<? extends Statement<?>> statements) throws BulkExecutionException
ReactorBulkReaderreadReactive in interface ReactiveBulkReaderreadReactive in interface ReactorBulkReaderstatements - The statements to execute.Flux of read results.BulkExecutionException - if the operation cannot complete normally.public Flux<ReadResult> readReactive(Iterable<? extends Statement<?>> statements) throws BulkExecutionException
ReactorBulkReaderreadReactive in interface ReactiveBulkReaderreadReactive in interface ReactorBulkReaderstatements - The statements to execute.Flux of read results.BulkExecutionException - if the operation cannot complete normally.public Flux<ReadResult> readReactive(Publisher<? extends Statement<?>> statements) throws BulkExecutionException
ReactorBulkReaderreadReactive in interface ReactiveBulkReaderreadReactive in interface ReactorBulkReaderstatements - The statements to execute.Flux of read results.BulkExecutionException - if the operation cannot complete normally.Copyright © 2017–2021 DataStax. All rights reserved.