Package com.atlassian.bamboo.plan.cache
Class CacheLoadContextSupport
java.lang.Object
com.atlassian.bamboo.plan.cache.CacheLoadContextSupport
-
Method Summary
Modifier and TypeMethodDescriptionstatic <V> VexecuteInCacheContextNoTx(@NotNull Callable<V> callable) Executes code in cache loading context (seeisInCacheLoadContext()), but does not open a new transaction.static booleanstatic <V> Vload(@NotNull org.springframework.transaction.support.TransactionTemplate transactionTemplate, @NotNull org.hibernate.SessionFactory sessionFactory, @NotNull Callable<V> callable) This method will mark the current thread as being in cache load context (seeisInCacheLoadContext()) and executes the supplied callback within a transaction retrieved from transactionTemplate.
-
Method Details
-
isInCacheLoadContext
public static boolean isInCacheLoadContext() -
load
public static <V> V load(@NotNull @NotNull org.springframework.transaction.support.TransactionTemplate transactionTemplate, @NotNull @NotNull org.hibernate.SessionFactory sessionFactory, @NotNull @NotNull Callable<V> callable) This method will mark the current thread as being in cache load context (seeisInCacheLoadContext()) and executes the supplied callback within a transaction retrieved from transactionTemplate. -
executeInCacheContextNoTx
Executes code in cache loading context (seeisInCacheLoadContext()), but does not open a new transaction.
-