com.atlassian.bamboo.caching
Class DashboardCachingManagerImpl

java.lang.Object
  extended by com.atlassian.bamboo.caching.DashboardCachingManagerImpl
All Implemented Interfaces:
DashboardCachingManager

public class DashboardCachingManagerImpl
extends java.lang.Object
implements DashboardCachingManager


Constructor Summary
DashboardCachingManagerImpl(PlanManager planManager, PluginHibernateSessionFactory pluginHibernateSessionFactory)
           
 
Method Summary
 java.util.List<Chain> getAllChains()
          Returns all chains in the system
 java.util.List<TopLevelPlan> getAllTopLevelPlans()
          Returns all top level plans (plans and chains) in the system
 java.util.Collection<TopLevelPlan> getAllTopLevelPlansUpdatedSince(long systemTime)
          Returns all builds since a given time
 Chain getChain(java.lang.String chainKey)
          Returns the cached chain for a given chainKey
 TopLevelPlan getPlan(PlanKey planKey)
          Returns the cached plan for a given planKey
 TopLevelPlan getPlan(java.lang.String planKey)
          Returns the cached plan for a given planKey
 void removePlanFromCache(PlanKey planKey)
          Removes the plan from the cache
 void removePlanFromCache(java.lang.String planKey)
          Removes the plan from the cache
 void resetCache()
          Clears the cache
 void updatePlanCache(java.util.Collection<PlanKey> planKeys)
          Refetches the passed plan keys from the database
 void updatePlanCache(PlanKey planKey)
          Refetches the passed plan key from the database
 void updatePlanCache(java.lang.String planKey)
          Refetches the passed plan key from the database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DashboardCachingManagerImpl

public DashboardCachingManagerImpl(PlanManager planManager,
                                   PluginHibernateSessionFactory pluginHibernateSessionFactory)
Method Detail

getAllTopLevelPlans

@NotNull
public java.util.List<TopLevelPlan> getAllTopLevelPlans()
Description copied from interface: DashboardCachingManager
Returns all top level plans (plans and chains) in the system

Specified by:
getAllTopLevelPlans in interface DashboardCachingManager
Returns:
sorted copy of list of all top level plans in the system, empty collection if none found

getPlan

public TopLevelPlan getPlan(@NotNull
                            PlanKey planKey)
Description copied from interface: DashboardCachingManager
Returns the cached plan for a given planKey

Specified by:
getPlan in interface DashboardCachingManager
Returns:

getAllTopLevelPlansUpdatedSince

public java.util.Collection<TopLevelPlan> getAllTopLevelPlansUpdatedSince(long systemTime)
Description copied from interface: DashboardCachingManager
Returns all builds since a given time

Specified by:
getAllTopLevelPlansUpdatedSince in interface DashboardCachingManager
Returns:

getPlan

public TopLevelPlan getPlan(@NotNull
                            java.lang.String planKey)
Description copied from interface: DashboardCachingManager
Returns the cached plan for a given planKey

Specified by:
getPlan in interface DashboardCachingManager
Returns:

getChain

public Chain getChain(@NotNull
                      java.lang.String chainKey)
Description copied from interface: DashboardCachingManager
Returns the cached chain for a given chainKey

Specified by:
getChain in interface DashboardCachingManager
Returns:

resetCache

public void resetCache()
Description copied from interface: DashboardCachingManager
Clears the cache

Specified by:
resetCache in interface DashboardCachingManager

getAllChains

@NotNull
public java.util.List<Chain> getAllChains()
Description copied from interface: DashboardCachingManager
Returns all chains in the system

Specified by:
getAllChains in interface DashboardCachingManager
Returns:
all chains in the system, empty collection if none found

updatePlanCache

public void updatePlanCache(@NotNull
                            PlanKey planKey)
Description copied from interface: DashboardCachingManager
Refetches the passed plan key from the database

Specified by:
updatePlanCache in interface DashboardCachingManager
Parameters:
planKey - Key of the plan to be updated

updatePlanCache

public void updatePlanCache(@NotNull
                            java.lang.String planKey)
Description copied from interface: DashboardCachingManager
Refetches the passed plan key from the database

Specified by:
updatePlanCache in interface DashboardCachingManager
Parameters:
planKey - Key of the plan to be updated

updatePlanCache

public void updatePlanCache(@NotNull
                            java.util.Collection<PlanKey> planKeys)
Description copied from interface: DashboardCachingManager
Refetches the passed plan keys from the database

Specified by:
updatePlanCache in interface DashboardCachingManager
Parameters:
planKeys - Keys of the plan to be updated

removePlanFromCache

public void removePlanFromCache(@NotNull
                                PlanKey planKey)
Description copied from interface: DashboardCachingManager
Removes the plan from the cache

Specified by:
removePlanFromCache in interface DashboardCachingManager
Parameters:
planKey - Key of the plan to be removed from cache

removePlanFromCache

public void removePlanFromCache(@NotNull
                                java.lang.String planKey)
Description copied from interface: DashboardCachingManager
Removes the plan from the cache

Specified by:
removePlanFromCache in interface DashboardCachingManager
Parameters:
planKey - Key of the plan to be removed from cache


Copyright © 2011 Atlassian. All Rights Reserved.