public class DashboardCachingManagerImpl extends Object implements DashboardCachingManager
Constructor and Description |
---|
DashboardCachingManagerImpl(ImmutablePlanCacheService immutablePlanCacheService,
PlanDao planDao) |
Modifier and Type | Method and Description |
---|---|
List<ImmutableChain> |
getAllChains()
Returns all chains (including chain branches) in the system
|
List<ImmutableTopLevelPlan> |
getAllTopLevelPlans()
Returns all top level plans (i.e.
|
com.google.common.collect.ImmutableCollection<ImmutableChain> |
getAllTopLevelPlansUnsorted() |
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(String planKey) |
void |
initCaches()
Initialises the caches
|
void |
invalidateAndUpdatePlanCache(PlanKey planKey)
Refetches the passed plan using the
ImmutablePlanCacheService enforcing invalidation of currently cached value. |
void |
removePlanFromCache(PlanKey planKey)
Removes the plan from the cache
|
void |
removePlansFromCache(Iterable<PlanKey> planKeys) |
void |
resetCache()
Clears the cache
|
void |
resetLatestSummary(PlanKey planKey,
PlanResultKey newResultKey) |
void |
updatePlanCache(Collection<PlanKey> planKeys)
Refetches the passed plans using the
ImmutablePlanCacheService . |
void |
updatePlanCache(PlanKey planKey)
Refetches the passed plan using the
ImmutablePlanCacheService . |
public DashboardCachingManagerImpl(ImmutablePlanCacheService immutablePlanCacheService, PlanDao planDao)
@NotNull public List<ImmutableTopLevelPlan> getAllTopLevelPlans()
DashboardCachingManager
getAllTopLevelPlans
in interface DashboardCachingManager
public com.google.common.collect.ImmutableCollection<ImmutableChain> getAllTopLevelPlansUnsorted()
getAllTopLevelPlansUnsorted
in interface DashboardCachingManager
@NotNull public List<ImmutableChain> getAllChains()
DashboardCachingManager
getAllChains
in interface DashboardCachingManager
public ImmutableChain getPlan(@NotNull PlanKey planKey)
DashboardCachingManager
getPlan
in interface DashboardCachingManager
public List<ImmutableTopLevelPlan> getAllTopLevelPlansUpdatedSince(long systemTime)
DashboardCachingManager
getAllTopLevelPlansUpdatedSince
in interface DashboardCachingManager
@Nullable public ImmutableChain getPlan(@NotNull String planKey)
public void resetCache()
DashboardCachingManager
resetCache
in interface DashboardCachingManager
public void updatePlanCache(@NotNull PlanKey planKey)
DashboardCachingManager
ImmutablePlanCacheService
.updatePlanCache
in interface DashboardCachingManager
planKey
- Key of the plan to be updatedpublic void invalidateAndUpdatePlanCache(PlanKey planKey)
DashboardCachingManager
ImmutablePlanCacheService
enforcing invalidation of currently cached value.invalidateAndUpdatePlanCache
in interface DashboardCachingManager
planKey
- Key of the plan to be updatedpublic void updatePlanCache(@NotNull Collection<PlanKey> planKeys)
DashboardCachingManager
ImmutablePlanCacheService
.updatePlanCache
in interface DashboardCachingManager
planKeys
- Keys of the plan to be updatedpublic void resetLatestSummary(@NotNull PlanKey planKey, @NotNull PlanResultKey newResultKey)
resetLatestSummary
in interface DashboardCachingManager
public void removePlanFromCache(@NotNull PlanKey planKey)
DashboardCachingManager
removePlanFromCache
in interface DashboardCachingManager
planKey
- Key of the plan to be removed from cachepublic void removePlansFromCache(@NotNull Iterable<PlanKey> planKeys)
removePlansFromCache
in interface DashboardCachingManager
public void initCaches()
DashboardCachingManager
initCaches
in interface DashboardCachingManager
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.