public interface SyncBulkWriter extends AutoCloseable
Methods of this interface are expected to block until the whole write operation completes.
| Modifier and Type | Method and Description |
|---|---|
default void |
writeSync(Iterable<? extends Statement<?>> statements)
Executes the given iterable of write statements synchronously.
|
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.
|
default void |
writeSync(Publisher<? extends Statement<?>> statements)
Executes the given flow of write statements synchronously.
|
void |
writeSync(Publisher<? extends Statement<?>> statements,
Consumer<? super WriteResult> consumer)
Executes the given flow of write statements synchronously, notifying the given consumer of
every write result.
|
WriteResult |
writeSync(Statement<?> statement)
Executes the given write statement synchronously.
|
default void |
writeSync(Stream<? extends Statement<?>> statements)
Executes the given stream of write statements synchronously.
|
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.
|
default WriteResult |
writeSync(String statement)
Executes the given write statement synchronously.
|
closedefault WriteResult writeSync(String statement) throws BulkExecutionException
statement - The statement to execute.BulkExecutionException - if the operation cannot complete normally.WriteResult writeSync(Statement<?> statement) throws BulkExecutionException
statement - The statement to execute.BulkExecutionException - if the operation cannot complete normally.default void writeSync(Stream<? extends Statement<?>> statements) throws BulkExecutionException
This method operates in a "fire and forget" mode. If you need to consume write results,
consider using writeSync(Stream, Consumer) instead.
statements - The statements to execute.BulkExecutionException - if the operation cannot complete normally.void writeSync(Stream<? extends Statement<?>> statements, Consumer<? super WriteResult> consumer) throws BulkExecutionException
statements - The statements to execute.consumer - A consumer for write results.BulkExecutionException - if the operation cannot complete normally.default void writeSync(Iterable<? extends Statement<?>> statements) throws BulkExecutionException
This method operates in a "fire and forget" mode. If you need to consume write results,
consider using writeSync(Iterable, Consumer) instead.
statements - The statements to execute.BulkExecutionException - if the operation cannot complete normally.void writeSync(Iterable<? extends Statement<?>> statements, Consumer<? super WriteResult> consumer) throws BulkExecutionException
statements - The statements to execute.consumer - A consumer for write results.BulkExecutionException - if the operation cannot complete normally.default void writeSync(Publisher<? extends Statement<?>> statements) throws BulkExecutionException
This method operates in a "fire and forget" mode. If you need to consume write results,
consider using writeSync(Publisher, Consumer) instead.
statements - The statements to execute.BulkExecutionException - if the operation cannot complete normally.void writeSync(Publisher<? extends Statement<?>> statements, Consumer<? super WriteResult> consumer) throws BulkExecutionException
statements - The statements to execute.consumer - A consumer for write results.BulkExecutionException - if the operation cannot complete normally.Copyright © 2017–2021 DataStax. All rights reserved.