Interface Batch
- All Superinterfaces:
AutoCloseable
Instruments the batching of cache operations.
Write-only cache operations invoked while this batch is active (i.e. not suspended) will defer invocation until
close().
Calling discard() will cause close() to undo previous write operations and discard any accumulated write-only operations (similar to setRollbackOnly() semantics).- Author:
- Paul Ferraro
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddiscard()Discards this batch.suspend()Suspends this batch.default Context<SuspendedBatch> Suspends this batch untilContext.close().
-
Field Details
-
LOGGER
-
-
Method Details
-
getStatus
Batch.Status getStatus() -
suspend
SuspendedBatch suspend()Suspends this batch.- Returns:
- a suspended batch
-
suspendWithContext
Suspends this batch untilContext.close().- Returns:
- a suspended batch context
-
discard
void discard()Discards this batch. A discarded batch must still be closed. -
close
void close()- Specified by:
closein interfaceAutoCloseable
-