public interface PdbBatch extends AutoCloseable
Inject, so that
instances can be generated from config using Guice injection.| Modifier and Type | Method and Description |
|---|---|
void |
add(BatchEntry batchEntry)
Adds the entry to the batch.
|
void |
add(String entityName,
EntityEntry ee)
Adds the entry to the batch.
|
void |
flush()
Flushes the pending batches.
|
CompletableFuture<Void> |
flushAsync()
Flushes the pending batches asynchronously, if the implementation allows it; otherwise, by default, this should
simply call
flush() and return the future when done. |
closevoid add(String entityName, EntityEntry ee) throws Exception
entityName - The table name.ee - The entity entry.Exception - If an error occurs while adding to the batch.void add(BatchEntry batchEntry) throws Exception
batchEntry - The batch entry.Exception - If an error occurs while adding to the batch.void flush()
throws Exception
Exception - If an error occurs while flushing.CompletableFuture<Void> flushAsync() throws Exception
flush() and return the future when done.CompletableFuture that completes when the flush action finishes.ExceptionCopyright © 2023 Feedzai. All rights reserved.