Interface Batch
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
ContextualBatch
- All Known Implementing Classes:
AbstractContextualBatch, DefaultTransactionalBatch, SimpleContextualBatch
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddiscard()Discards this batch.Returns the status of this batch.suspend()Suspends this batch.default Context<SuspendedBatch> Suspends this batch untilContext.close().
-
Method Details
-
getStatus
-
suspend
-
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
-