Interface Transaction
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
RecordContextTransaction
,RecordStoreAndRecordContextTransaction
public interface Transaction extends java.lang.AutoCloseable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
abort()
void
close()
void
commit()
boolean
isClosed()
default <T> T
unwrap(java.lang.Class<? extends T> type)
Unwraps this instance as type T, if such a cast is possible.
-
-
-
Method Detail
-
commit
void commit() throws com.apple.foundationdb.relational.api.exceptions.RelationalException
- Throws:
com.apple.foundationdb.relational.api.exceptions.RelationalException
-
abort
void abort() throws com.apple.foundationdb.relational.api.exceptions.RelationalException
- Throws:
com.apple.foundationdb.relational.api.exceptions.RelationalException
-
close
void close() throws com.apple.foundationdb.relational.api.exceptions.RelationalException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
com.apple.foundationdb.relational.api.exceptions.RelationalException
-
isClosed
boolean isClosed()
-
unwrap
@Nonnull default <T> T unwrap(@Nonnull java.lang.Class<? extends T> type) throws com.apple.foundationdb.relational.api.exceptions.InternalErrorException
Unwraps this instance as type T, if such a cast is possible. This provides a convenient API for unwrapping implementation calls from the interface (to avoid lots of instanceof checks everywhere).- Type Parameters:
T
- the generic type- Parameters:
type
- the type to unwrap it as.- Returns:
- this instance, as an instanceof Type T
- Throws:
com.apple.foundationdb.relational.api.exceptions.InternalErrorException
- if instance types are incompatible
-
-