Class TransactionManagerFactory
java.lang.Object
google.registry.persistence.transaction.TransactionManagerFactory
Factory class to create
TransactionManager
instance.-
Method Summary
Modifier and TypeMethodDescriptionstatic JpaTransactionManager
Returns a read-onlyJpaTransactionManager
instance if configured.static void
setJpaTm
(Supplier<JpaTransactionManager> jpaTmSupplier) Sets the return oftm()
to the given instance ofJpaTransactionManager
.static void
setJpaTmOnBeamWorker
(Supplier<JpaTransactionManager> jpaTmSupplier) static void
setReplicaJpaTm
(Supplier<JpaTransactionManager> replicaJpaTmSupplier) Sets the value ofreplicaTm()
to the givenJpaTransactionManager
.static JpaTransactionManager
tm()
ReturnsJpaTransactionManager
instance.
-
Method Details
-
tm
ReturnsJpaTransactionManager
instance.Between invocations of
setJpaTm(java.util.function.Supplier<google.registry.persistence.transaction.JpaTransactionManager>)
every call to this method returns the same instance. -
replicaTm
Returns a read-onlyJpaTransactionManager
instance if configured. -
setJpaTm
Sets the return oftm()
to the given instance ofJpaTransactionManager
. -
setReplicaJpaTm
Sets the value ofreplicaTm()
to the givenJpaTransactionManager
. -
setJpaTmOnBeamWorker
Makestm()
return theJpaTransactionManager
instance provided byjpaTmSupplier
from now on. This method should only be called by an implementor ofJvmInitializer
.
-