com.atlassian.bamboo.plan.cache
Class CacheLoadContextSupport

java.lang.Object
  extended by com.atlassian.bamboo.plan.cache.CacheLoadContextSupport

public class CacheLoadContextSupport
extends java.lang.Object


Method Summary
static void enterCacheLoadContext()
           
static org.springframework.orm.hibernate.HibernateTemplate getHibernateTemplate()
           
static boolean isInCacheLoadContext()
           
static boolean leaveCacheLoadContext()
           
static
<V> V
load(org.springframework.transaction.support.TransactionTemplate transactionTemplate, org.springframework.orm.hibernate.HibernateTemplate hibernateTemplate, java.util.concurrent.Callable<V> callable)
          This method will mark the current thread as being in cache load context (see $isInCacheLoadContext() and executes the supplied callback within a transaction retrieved from transactionTemplate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isInCacheLoadContext

public static boolean isInCacheLoadContext()

leaveCacheLoadContext

public static boolean leaveCacheLoadContext()

enterCacheLoadContext

public static void enterCacheLoadContext()

getHibernateTemplate

public static org.springframework.orm.hibernate.HibernateTemplate getHibernateTemplate()

load

public static <V> V load(@NotNull
                         org.springframework.transaction.support.TransactionTemplate transactionTemplate,
                         org.springframework.orm.hibernate.HibernateTemplate hibernateTemplate,
                         @NotNull
                         java.util.concurrent.Callable<V> callable)
This method will mark the current thread as being in cache load context (see $isInCacheLoadContext() and executes the supplied callback within a transaction retrieved from transactionTemplate. It also sets up a new HibernateTemplate, made available via $getHibernateTemplate()



Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.