public interface SessionUtils
Modifier and Type | Method and Description |
---|---|
default void |
withManualFlush(Runnable runnable) |
<V> V |
withManualFlush(java.util.function.Supplier<V> supplier)
Converts the flush mode for the current session factory to MANUAL
for the duration of the call to the given supplier.
|
default void |
withReadOnlyTransaction(Runnable runnable) |
<V> V |
withReadOnlyTransaction(java.util.function.Supplier<V> supplier)
Invokes the given supplier within the context of a read-only transaction.
|
default void |
withTransaction(Runnable runnable) |
<V> V |
withTransaction(java.util.function.Supplier<V> supplier)
Invoked the given supplier within the context of a transaction.
|
<V> V withTransaction(java.util.function.Supplier<V> supplier)
V
- type returned by the suppliersupplier
- supplier to invokedefault void withTransaction(Runnable runnable)
<V> V withReadOnlyTransaction(java.util.function.Supplier<V> supplier)
V
- type returned by the suppliersupplier
- supplier to invokedefault void withReadOnlyTransaction(Runnable runnable)
<V> V withManualFlush(java.util.function.Supplier<V> supplier)
V
- type returned by the suppliersupplier
- supplier to invokedefault void withManualFlush(Runnable runnable)
Copyright © 2021. All rights reserved.