@Internal
public interface ImmutablePlanCacheService
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()
)
CachedPlanManager
instead.Modifier and Type | Interface and Description |
---|---|
static interface |
ImmutablePlanCacheService.CacheInvalidator |
Modifier and Type | Method and Description |
---|---|
void |
cascadeInvalidate(PlanKey planKey)
Removes the cached reference for the passed plan and its children.
|
void |
disableCache()
Disable cache.
|
void |
enableCache()
Enable cache.
|
Optional<ImmutableChain> |
getAnyPlan(Predicate<? super ImmutableChain> predicate)
Returns a plan matching the supplied predicate
|
Range<Integer> |
getBuildNumbersRange(PlanKey planKey)
Deprecated.
since 5.10
|
BambooCacheStats |
getCacheStats()
Retrieve cache statistics
|
Iterable<PlanKey> |
getChainsToInvalidate(ImmutablePlanCacheService.CacheInvalidator invalidator)
Internal.
|
ImmutableChain |
getImmutablePlanByKey(PlanKey planKey)
Returns a plan if one exists with the key.
|
PlanCacheIndices |
getIndices()
Returns the indices created for plan cache content.
|
<T extends ImmutablePlan> |
getPlans(Class<T> planType,
com.google.common.base.Predicate<? super T> filter)
|
Stream<ImmutablePlan> |
getPlans(Predicate<ImmutablePlan> predicate)
Returns a stream of plans (chains+jobs) matching the supplied predicate.
|
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 |
invalidateBuildNumbersRange(PlanKey planKey,
int buildNumber,
boolean trueForSaveFalseForDelete)
Deprecated.
since 5.10
|
void |
remove(PlanKey planKey)
Removes the cached Plan and its metadata.
|
void |
resetLatestResultSummary(PlanResultKey key)
Resets the latest build summary of a plan.
|
<V> V |
withHiddenPlans(Collection<PlanKey> planKeys,
Supplier<V> supplier)
Invokes supplier while marking the specified plan keys as unavailable.
|
@Nullable ImmutableChain getImmutablePlanByKey(@NotNull PlanKey planKey)
withHiddenPlans(Collection, Supplier)
@NotNull <T extends ImmutablePlan> Stream<T> getPlans(Class<T> planType, @NotNull com.google.common.base.Predicate<? super T> filter)
planType
- - the type of the plan to retrieveDescriptionProvider.getName()
<V> V withHiddenPlans(Collection<PlanKey> planKeys, Supplier<V> supplier)
void invalidate(@NotNull PlanKey planKey)
planKey
- key of the Plan to be removed from cachevoid cascadeInvalidate(@NotNull PlanKey planKey)
planKey
- key of the Plan to be removed from cachevoid remove(@NotNull PlanKey planKey)
planKey
- key of the Plan to be removed from cachevoid initialiseCache()
void disableCache()
void enableCache()
initialiseCache()
instead if you expect plans to be loaded.BambooCacheStats getCacheStats()
@Internal @NotNull Iterable<PlanKey> getChainsToInvalidate(@NotNull ImmutablePlanCacheService.CacheInvalidator invalidator)
ImmutablePlanCacheService.CacheInvalidator
invalidator
- @NotNull PlanCacheIndices getIndices()
@Deprecated @Internal @NotNull Range<Integer> getBuildNumbersRange(PlanKey planKey)
@Deprecated @Internal void invalidateBuildNumbersRange(PlanKey planKey, int buildNumber, boolean trueForSaveFalseForDelete)
Stream<ImmutablePlan> getPlans(Predicate<ImmutablePlan> predicate)
Optional<ImmutableChain> getAnyPlan(Predicate<? super ImmutableChain> predicate)
predicate
- void resetLatestResultSummary(PlanResultKey key)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.