|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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()
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 ImmutablePlanCacheService.lockPlan(com.atlassian.bamboo.plan.PlanKey) |
|
| 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 ImmutablePlanCacheServiceplanKey - key of the Plan to be removed from cache
public void cascadeInvalidate(@NotNull
PlanKey planKey)
ImmutablePlanCacheService
cascadeInvalidate in interface ImmutablePlanCacheServiceplanKey - key of the Plan to be removed from cachepublic void cascadeInvalidate(long chainId)
PlanConfigurationAspect.resetImmutablePlanCacheService(BranchCommitInformation)
cascadeInvalidate in interface ImmutablePlanCacheServicechainId - id of chain to be removed from cache
public void reset(@NotNull
PlanKey planKey)
ImmutablePlanCacheService
reset in interface ImmutablePlanCacheServiceplanKey - key of the Plan to be removed from cachepublic void resetAll()
ImmutablePlanCacheService
resetAll in interface ImmutablePlanCacheServicepublic void initialiseCache()
ImmutablePlanCacheService
initialiseCache in interface ImmutablePlanCacheServicepublic void disableCache()
ImmutablePlanCacheService
disableCache in interface ImmutablePlanCacheServicepublic void enableCache()
ImmutablePlanCacheServiceImmutablePlanCacheService.initialiseCache() instead if you expect plans to be loaded.
enableCache in interface ImmutablePlanCacheServicepublic BambooCacheStats getCacheStats()
ImmutablePlanCacheService
getCacheStats in interface ImmutablePlanCacheService@NotNull public <T extends ImmutablePlan> java.util.List<T> getPlans(java.lang.Class<T> planType)
ImmutablePlanCacheServicePlan'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 ImmutablePlanCacheServiceplanType - - 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)
ImmutablePlanCacheServicePlan'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 ImmutablePlanCacheServiceplanType - - the type of the plan to retrieve
DescriptionProvider.getName()
public PlanIdentifier getPlanIdentifierForPermissionCheckingByKey(@NotNull
PlanKey planKey)
ImmutablePlanCacheServicePlan 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
getPlanIdentifierForPermissionCheckingByKey in interface ImmutablePlanCacheServiceplanKey - of the plan to find
public void lockPlan(@NotNull
PlanKey planKey)
ImmutablePlanCacheService
lockPlan in interface ImmutablePlanCacheServiceplanKey - key of the Plan to be made inaccessible
public void unlockPlan(@NotNull
PlanKey planKey)
ImmutablePlanCacheServiceImmutablePlanCacheService.lockPlan(com.atlassian.bamboo.plan.PlanKey)
unlockPlan in interface ImmutablePlanCacheServiceplanKey - key of the Plan to be made accessible
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||