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(ImmutablePlanCacheService immutablePlanCacheService, PlanDao planDao)
           
 
Method Summary
 java.util.List<ImmutableChain> getAllChains()
          Returns all chains (including chain branches) in the system
 java.util.List<ImmutableTopLevelPlan> getAllTopLevelPlans()
          Returns all top level plans (i.e.
 java.util.List<ImmutableTopLevelPlan> getAllTopLevelPlansUpdatedSince(long systemTime)
          Returns all builds since a given time
 ImmutableChain getPlan(PlanKey planKey)
          Returns the cached plan for a given planKey
 ImmutableChain getPlan(java.lang.String planKey)
           
 void initCaches()
          Initialises the caches
 void removePlanFromCache(PlanKey planKey)
          Removes the plan from the cache
 void removePlansFromCache(java.lang.Iterable<PlanKey> planKeys)
           
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DashboardCachingManagerImpl

public DashboardCachingManagerImpl(ImmutablePlanCacheService immutablePlanCacheService,
                                   PlanDao planDao)
Method Detail

getAllTopLevelPlans

@NotNull
public java.util.List<ImmutableTopLevelPlan> getAllTopLevelPlans()
Description copied from interface: DashboardCachingManager
Returns all top level plans (i.e. top level 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

getAllChains

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

Specified by:
getAllChains in interface DashboardCachingManager
Returns:
sorted copy of list of all chains in the system, empty if none found

getPlan

public ImmutableChain 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.List<ImmutableTopLevelPlan> getAllTopLevelPlansUpdatedSince(long systemTime)
Description copied from interface: DashboardCachingManager
Returns all builds since a given time

Specified by:
getAllTopLevelPlansUpdatedSince in interface DashboardCachingManager
Returns:

getPlan

@Nullable
public ImmutableChain getPlan(@NotNull
                                       java.lang.String planKey)

resetCache

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

Specified by:
resetCache in interface DashboardCachingManager

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.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

removePlansFromCache

public void removePlansFromCache(@NotNull
                                 java.lang.Iterable<PlanKey> planKeys)
Specified by:
removePlansFromCache in interface DashboardCachingManager

initCaches

public void initCaches()
Description copied from interface: DashboardCachingManager
Initialises the caches

Specified by:
initCaches in interface DashboardCachingManager


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