Interface Batch
- All Superinterfaces:
AutoCloseable
Exposes a mechanism to close a batch, and potentially discard it.
- Author:
- Paul Ferraro
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddiscard()Discards this batch.getState()Returns the state of this batch.default booleanisActive()Indicates whether or not this batch is active.default booleanisClosed()Indicates whether or not this batch was closed.default booleanIndicates whether or not this batch was discarded.
-
Method Details
-
discard
void discard()Discards this batch. A discarded batch must still be closed. -
getState
Batch.State getState()Returns the state of this batch.- Returns:
- the state of this batch.
-
isActive
default boolean isActive()Indicates whether or not this batch is active.- Returns:
- true, if this batch is active, false otherwise.
-
isDiscarded
default boolean isDiscarded()Indicates whether or not this batch was discarded.- Returns:
- true, if this batch was discarded, false otherwise.
-
isClosed
default boolean isClosed()Indicates whether or not this batch was closed.- Returns:
- true, if this batch was closed, false otherwise.
-
close
void close()- Specified by:
closein interfaceAutoCloseable
-