Interface TxManager
-
- All Superinterfaces:
java.lang.AutoCloseable
public interface TxManager extends java.lang.AutoCloseable- Author:
- Fabrizio Giudici
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTxManager.__
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()<T> TcomputeInTx(java.util.function.Function<? super javax.persistence.EntityManager,T> task)static TxManagergetInstance()default voidrunInTx(java.util.function.Consumer<? super javax.persistence.EntityManager> task)
-
-
-
Method Detail
-
getInstance
@Nonnull static TxManager getInstance()
-
computeInTx
<T> T computeInTx(@Nonnull java.util.function.Function<? super javax.persistence.EntityManager,T> task)
-
runInTx
default void runInTx(@Nonnull java.util.function.Consumer<? super javax.persistence.EntityManager> task)
-
close
default void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
-