com.atlassian.bamboo.plan.cache
Class PlansState

java.lang.Object
  extended by com.atlassian.bamboo.plan.cache.PlansState

@Immutable
@ThreadSafe
public class PlansState
extends Object

An immutable class that represents the the available plans at a particular point in time.

Since:
v3.4

Constructor Summary
PlansState()
           
PlansState(Iterable<? extends ImmutableChain> chainCache)
           
 
Method Summary
 List<ImmutableChain> getAllChains()
           
 List<ImmutableTopLevelPlan> getAllTopLevelPlans()
           
 ImmutableChain getPlan(PlanKey planKey)
           
 com.google.common.collect.ImmutableCollection<ImmutableChain> getUnsortedPlans()
           
 PlansState removePlanFromState(PlanKey planKey)
          Removes the plan from the cache
 PlansState removePlansFromState(Iterable<PlanKey> planKeys)
           
 PlansState updateState(ImmutableChain plan)
           
 PlansState updateState(Map<PlanKey,? extends ImmutableChain> plansMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlansState

public PlansState()

PlansState

public PlansState(Iterable<? extends ImmutableChain> chainCache)
Method Detail

getPlan

public ImmutableChain getPlan(@NotNull
                              PlanKey planKey)

getAllTopLevelPlans

@NotNull
public List<ImmutableTopLevelPlan> getAllTopLevelPlans()

getUnsortedPlans

public com.google.common.collect.ImmutableCollection<ImmutableChain> getUnsortedPlans()

getAllChains

public List<ImmutableChain> getAllChains()

updateState

public PlansState updateState(@NotNull
                              ImmutableChain plan)

updateState

public PlansState updateState(@NotNull
                              Map<PlanKey,? extends ImmutableChain> plansMap)

removePlanFromState

public PlansState removePlanFromState(@NotNull
                                      PlanKey planKey)
Removes the plan from the cache

Parameters:
planKey - Key of the plan to be removed from cache

removePlansFromState

public PlansState removePlansFromState(@NotNull
                                       Iterable<PlanKey> planKeys)


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.