public interface ReactiveCassandraBatchOperations
ReactiveCassandraBatchOperations
use
logged Cassandra BATCH
es for single entities and collections of entities. A
ReactiveCassandraBatchOperations
instance cannot be modified/used once it was executed.
Batches are atomic by default. In the context of a Cassandra batch operation, atomic means that if any of the batch
succeeds, all of it will. Statement order does not matter within a batch. ReactiveCassandraBatchOperations
applies all rows using the same timestamp
if supplied, otherwise Cassandra will generate
a timestamp.
Multi partition batches should only be used to achieve atomicity for a few writes on different tables. Apart from this they should be avoided because they’re too expensive. Single partition batches can be used to get atomicity and isolation, they're not much more expensive than normal writes.
Modifier and Type | Method and Description |
---|---|
ReactiveCassandraBatchOperations |
delete(Iterable<?> entities)
Add a collection of deletes to the batch.
|
ReactiveCassandraBatchOperations |
delete(Iterable<?> entities,
WriteOptions options)
Add a collection of deletes with given
WriteOptions to the batch. |
ReactiveCassandraBatchOperations |
delete(reactor.core.publisher.Mono<? extends Iterable<?>> entities)
Add a collection of deletes to the batch.
|
ReactiveCassandraBatchOperations |
delete(reactor.core.publisher.Mono<? extends Iterable<?>> entities,
WriteOptions options)
Add a collection of deletes with given
WriteOptions to the batch. |
ReactiveCassandraBatchOperations |
delete(Object... entities)
Add an array of deletes to the batch.
|
reactor.core.publisher.Mono<WriteResult> |
execute()
Execute the batch.
|
ReactiveCassandraBatchOperations |
insert(Iterable<?> entities)
Add a collection of inserts to the batch.
|
ReactiveCassandraBatchOperations |
insert(Iterable<?> entities,
WriteOptions options)
Add a collection of inserts with given
WriteOptions to the batch. |
ReactiveCassandraBatchOperations |
insert(reactor.core.publisher.Mono<? extends Iterable<?>> entities)
Add a collection of inserts to the batch.
|
ReactiveCassandraBatchOperations |
insert(reactor.core.publisher.Mono<? extends Iterable<?>> entities,
WriteOptions options)
Add a collection of inserts with given
WriteOptions to the batch. |
ReactiveCassandraBatchOperations |
insert(Object... entities)
Add an array of inserts to the batch.
|
ReactiveCassandraBatchOperations |
update(Iterable<?> entities)
Add a collection of updates to the batch.
|
ReactiveCassandraBatchOperations |
update(Iterable<?> entities,
WriteOptions options)
Add a collection of updates with given
WriteOptions to the batch. |
ReactiveCassandraBatchOperations |
update(reactor.core.publisher.Mono<? extends Iterable<?>> entities)
Add a collection of updates to the batch.
|
ReactiveCassandraBatchOperations |
update(reactor.core.publisher.Mono<? extends Iterable<?>> entities,
WriteOptions options)
Add a collection of updates with given
WriteOptions to the batch. |
ReactiveCassandraBatchOperations |
update(Object... entities)
Add an array of updates to the batch.
|
ReactiveCassandraBatchOperations |
withTimestamp(long timestamp)
Apply a given
timestamp to the whole batch. |
reactor.core.publisher.Mono<WriteResult> execute()
subscribe
.Mono
for the bulk operation. Terminates with IllegalStateException
if an
already executed batch is being attempted to execute.ReactiveCassandraBatchOperations withTimestamp(long timestamp)
timestamp
to the whole batch.timestamp
- the timestamp to apply.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.ReactiveCassandraBatchOperations insert(Object... entities)
entities
- the entities to insert; must not be null.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.ReactiveCassandraBatchOperations insert(Iterable<?> entities)
entities
- the entities to insert; must not be null.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.ReactiveCassandraBatchOperations insert(reactor.core.publisher.Mono<? extends Iterable<?>> entities)
entities
- the entities to insert; must not be null.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.ReactiveCassandraBatchOperations insert(Iterable<?> entities, WriteOptions options)
WriteOptions
to the batch.entities
- the entities to insert; must not be null.options
- the WriteOptions to apply; must not be null.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.InsertOptions
ReactiveCassandraBatchOperations insert(reactor.core.publisher.Mono<? extends Iterable<?>> entities, WriteOptions options)
WriteOptions
to the batch.entities
- the entities to insert; must not be null.options
- the WriteOptions to apply; must not be null.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.InsertOptions
ReactiveCassandraBatchOperations update(Object... entities)
entities
- the entities to update; must not be null.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.ReactiveCassandraBatchOperations update(Iterable<?> entities)
entities
- the entities to update; must not be null.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.ReactiveCassandraBatchOperations update(reactor.core.publisher.Mono<? extends Iterable<?>> entities)
entities
- the entities to update; must not be null.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.ReactiveCassandraBatchOperations update(Iterable<?> entities, WriteOptions options)
WriteOptions
to the batch.entities
- the entities to update; must not be null.options
- the WriteOptions to apply; must not be null.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.UpdateOptions
ReactiveCassandraBatchOperations update(reactor.core.publisher.Mono<? extends Iterable<?>> entities, WriteOptions options)
WriteOptions
to the batch.entities
- the entities to update; must not be null.options
- the WriteOptions to apply; must not be null.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.UpdateOptions
ReactiveCassandraBatchOperations delete(Object... entities)
entities
- the entities to delete; must not be null.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.ReactiveCassandraBatchOperations delete(Iterable<?> entities)
entities
- the entities to delete; must not be null.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.ReactiveCassandraBatchOperations delete(reactor.core.publisher.Mono<? extends Iterable<?>> entities)
entities
- the entities to delete; must not be null.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.ReactiveCassandraBatchOperations delete(Iterable<?> entities, WriteOptions options)
WriteOptions
to the batch.entities
- the entities to delete; must not be null.options
- the WriteOptions to apply; must not be null.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.DeleteOptions
ReactiveCassandraBatchOperations delete(reactor.core.publisher.Mono<? extends Iterable<?>> entities, WriteOptions options)
WriteOptions
to the batch.entities
- the entities to delete; must not be null.options
- the WriteOptions to apply; must not be null.this
ReactiveCassandraBatchOperations
.IllegalStateException
- if the batch was already executed.DeleteOptions
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.