|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ImmutablePlanCacheService
An experimental API for getting immutable, weakly held, cached ImmutableChain. This Service does not
check for permissions currently. Only works for Chain.
Cache is disabled by default and should be explicitly enabled by application (preferably by calling initialiseCache())
Concepts:
CachedPlanManager instead.
In 3.4, only used for Dashboard Cache
| Method Summary | ||
|---|---|---|
void |
cascadeInvalidate(long planId)
Removes the cached reference for the passed plan and its children. |
|
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()
Retrieve cache statistics |
|
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 TopLevelPlans |
|
|
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 |
lockPlan(PlanKey planKey)
Makes plan inaccessible |
|
void |
reset(PlanKey planKey)
Removes the cached Plan and its metadata. |
|
void |
resetAll()
Nukes the cache |
|
void |
unlockPlan(PlanKey planKey)
Makes plan accessible after lockPlan(com.atlassian.bamboo.plan.PlanKey) |
|
| Method Detail |
|---|
@Nullable
ImmutableChain getImmutablePlanByKey(@NotNull
PlanKey planKey)
planKey -
@Nullable
ImmutableJob getMasterOfJob(@NotNull
PlanKey jobKey,
@NotNull
PlanKey masterChainKey)
@NotNull <T extends ImmutablePlan> java.util.List<T> getPlans(java.lang.Class<T> planType)
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.
planType - - the type of the plan to retrieve
DescriptionProvider.getName()
@NotNull
<T extends ImmutablePlan> java.util.List<T> getPlans(java.lang.Class<T> planType,
@NotNull
com.google.common.base.Predicate<? super T> filter)
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.
planType - - the type of the plan to retrieve
DescriptionProvider.getName()
@Nullable
PlanIdentifier getPlanIdentifierForPermissionCheckingByKey(@NotNull
PlanKey planKey)
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 TopLevelPlans
planKey - of the plan to find
void lockPlan(@NotNull
PlanKey planKey)
planKey - key of the Plan to be made inaccessible
void unlockPlan(@NotNull
PlanKey planKey)
lockPlan(com.atlassian.bamboo.plan.PlanKey)
planKey - key of the Plan to be made accessible
void invalidate(@NotNull
PlanKey planKey)
planKey - key of the Plan to be removed from cache
void cascadeInvalidate(@NotNull
PlanKey planKey)
planKey - key of the Plan to be removed from cachevoid cascadeInvalidate(long planId)
planId -
void reset(@NotNull
PlanKey planKey)
planKey - key of the Plan to be removed from cachevoid resetAll()
void initialiseCache()
void disableCache()
void enableCache()
initialiseCache() instead if you expect plans to be loaded.
BambooCacheStats getCacheStats()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||