|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.plan.cache.ImmutablePlanCacheServiceImpl
public class ImmutablePlanCacheServiceImpl
Constructor Summary | |
---|---|
ImmutablePlanCacheServiceImpl(ImmutablePlanManager immutablePlanManager,
PlanDao planDao)
|
Method Summary | ||
---|---|---|
void |
cascadeInvalidate(long chainId)
Resetting cache by id is evil and should not be done. |
|
void |
cascadeInvalidate(PlanKey planKey)
Removes the cached reference for the passed plan and its children. |
|
void |
disableCache()
Disable cache. |
|
void |
enableCache()
Enable cache. |
|
BambooCacheStats |
getCacheStats()
|
|
ImmutableChain |
getImmutablePlanByKey(PlanKey planKey)
Returns a plan if one exists with the key. |
|
ImmutableJob |
getMasterOfJob(PlanKey jobKey,
PlanKey masterChainKey)
|
|
PlanIdentifier |
getPlanIdentifierForPermissionCheckingByKey(PlanKey planKey)
Returns a Plan skeleton skeleton providing ONLY id and key, that matches the given key This method should
be used only for permission checking using Acegi
If Job key is provided as a parameter, parent Chain will be returned anyway, as Acegi assertions are
defined only for TopLevelPlan s |
|
|
getPlans(java.lang.Class<T> planType)
Returns all Plan 's filtered by Class . |
|
|
getPlans(java.lang.Class<T> planType,
com.google.common.base.Predicate<? super T> filter)
Returns all Plan 's filtered by Class . |
|
void |
initialiseCache()
Clear the cache and attempt to read all Chains from DB in order to cache them. |
|
void |
invalidate(PlanKey planKey)
Removes the cached Plan. |
|
void |
reset(PlanKey planKey)
Removes the cached Plan and its metadata. |
|
void |
resetAll()
Nukes the cache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImmutablePlanCacheServiceImpl(@NotNull ImmutablePlanManager immutablePlanManager, @NotNull PlanDao planDao)
Method Detail |
---|
@Nullable public ImmutableChain getImmutablePlanByKey(@NotNull PlanKey planKey)
ImmutablePlanCacheService
getImmutablePlanByKey
in interface ImmutablePlanCacheService
public ImmutableJob getMasterOfJob(@NotNull PlanKey jobKey, @NotNull PlanKey masterChainKey)
getMasterOfJob
in interface ImmutablePlanCacheService
public void invalidate(@NotNull PlanKey planKey)
ImmutablePlanCacheService
invalidate
in interface ImmutablePlanCacheService
planKey
- key of the Plan to be removed from cachepublic void cascadeInvalidate(@NotNull PlanKey planKey)
ImmutablePlanCacheService
cascadeInvalidate
in interface ImmutablePlanCacheService
planKey
- key of the Plan to be removed from cachepublic void cascadeInvalidate(long chainId)
PlanConfigurationAspect.resetImmutablePlanCacheService(BranchCommitInformation)
cascadeInvalidate
in interface ImmutablePlanCacheService
chainId
- id of chain to be removed from cachepublic void reset(@NotNull PlanKey planKey)
ImmutablePlanCacheService
reset
in interface ImmutablePlanCacheService
planKey
- key of the Plan to be removed from cachepublic void resetAll()
ImmutablePlanCacheService
resetAll
in interface ImmutablePlanCacheService
public void initialiseCache()
ImmutablePlanCacheService
initialiseCache
in interface ImmutablePlanCacheService
public void disableCache()
ImmutablePlanCacheService
disableCache
in interface ImmutablePlanCacheService
public void enableCache()
ImmutablePlanCacheService
ImmutablePlanCacheService.initialiseCache()
instead if you expect plans to be loaded.
enableCache
in interface ImmutablePlanCacheService
public BambooCacheStats getCacheStats()
getCacheStats
in interface ImmutablePlanCacheService
@NotNull public <T extends ImmutablePlan> java.util.List<T> getPlans(java.lang.Class<T> planType)
ImmutablePlanCacheService
Plan
's filtered by Class
. Does not include plans marked for deletion.
This method will not load anything from DB - it will operate only on cached data.
getPlans
in interface ImmutablePlanCacheService
planType
- - the type of the plan to retrieve
DescriptionProvider.getName()
@NotNull public <T extends ImmutablePlan> java.util.List<T> getPlans(java.lang.Class<T> planType, @NotNull com.google.common.base.Predicate<? super T> filter)
ImmutablePlanCacheService
Plan
's filtered by Class
. Does not include plans marked for deletion.
This method will not load anything from DB - it will operate only on cached data.
getPlans
in interface ImmutablePlanCacheService
planType
- - the type of the plan to retrieve
DescriptionProvider.getName()
public PlanIdentifier getPlanIdentifierForPermissionCheckingByKey(@NotNull PlanKey planKey)
ImmutablePlanCacheService
Plan
skeleton skeleton providing ONLY id and key, that matches the given key This method should
be used only for permission checking using Acegi
If Job
key is provided as a parameter, parent Chain will be returned anyway, as Acegi assertions are
defined only for TopLevelPlan
s
getPlanIdentifierForPermissionCheckingByKey
in interface ImmutablePlanCacheService
planKey
- of the plan to find
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |