Package org.jenkinsci.plugins.cloudstats
Class ActivityIndex
- java.lang.Object
-
- org.jenkinsci.plugins.cloudstats.ActivityIndex
-
public final class ActivityIndex extends Object
Indexed view of statistics snapshot.Provides access to activities indexed by cloud, template, etc.
- Author:
- ogondza.
- See Also:
CloudStatistics.getIndex()
-
-
Field Summary
Fields Modifier and Type Field Description static List<ProvisioningActivity>
EMPTY
-
Constructor Summary
Constructors Constructor Description ActivityIndex(List<ProvisioningActivity> activities)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Collection<ProvisioningActivity>>
byCloud()
Get activities sorted by owning cloud.Map<String,Map<String,Collection<ProvisioningActivity>>>
byTemplate()
Get activities sorted by owning cloud and templateHealth
cloudHealth(String cloud)
Collection<ProvisioningActivity>
forCloud(String name)
Get activities owned by particular cloud.Collection<ProvisioningActivity>
forTemplate(String cloud, String template)
Get activities owned by particular cloud and template.Map<String,Health>
healthByCloud()
Get map of cloud names to their health metrics.Map<String,Map<String,Health>>
healthByTemplate()
Health
templateHealth(String cloud, String template)
-
-
-
Field Detail
-
EMPTY
public static final List<ProvisioningActivity> EMPTY
-
-
Constructor Detail
-
ActivityIndex
public ActivityIndex(@NonNull List<ProvisioningActivity> activities)
-
-
Method Detail
-
byCloud
@NonNull public Map<String,Collection<ProvisioningActivity>> byCloud()
Get activities sorted by owning cloud.- Returns:
- Map where cloud names are the keys.
-
byTemplate
@NonNull public Map<String,Map<String,Collection<ProvisioningActivity>>> byTemplate()
Get activities sorted by owning cloud and template- Returns:
- Map where cloud names are the keys, values are maps where keys are template names. Note that template name can be null in case the cloud is not using templates. It should be the only key in such a case.
-
forCloud
@NonNull public Collection<ProvisioningActivity> forCloud(@NonNull String name)
Get activities owned by particular cloud.
-
forTemplate
@NonNull public Collection<ProvisioningActivity> forTemplate(@NonNull String cloud, @Nullable String template)
Get activities owned by particular cloud and template.
-
healthByCloud
@NonNull public Map<String,Health> healthByCloud()
Get map of cloud names to their health metrics.
-
-