Package edu.byu.hbll.box
Class BoxHealth
- java.lang.Object
-
- edu.byu.hbll.box.BoxHealth
-
public class BoxHealth extends Object
A snapshot of the health of the Box system.- Author:
- Charles Draper
-
-
Constructor Summary
Constructors Constructor Description BoxHealth(boolean healthy, Map<String,SourceHealth> sourceHealthMap)
Creates a newBoxHealth
initialized with the given health information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SourceHealth
getSourceHealth(String sourceName)
Returns the health of the given source.Map<String,SourceHealth>
getSourceHealthMap()
Returns the health information for all sources keyed by sourceName.boolean
isHealthy()
Returns whether this box is healthy.
-
-
-
Constructor Detail
-
BoxHealth
public BoxHealth(boolean healthy, Map<String,SourceHealth> sourceHealthMap)
Creates a newBoxHealth
initialized with the given health information.- Parameters:
healthy
- whether or not the overall health of box is goodsourceHealthMap
- the health information for all sources keyed by sourceName
-
-
Method Detail
-
isHealthy
public boolean isHealthy()
Returns whether this box is healthy.- Returns:
- whether or not the overall health of box is good
-
getSourceHealth
public SourceHealth getSourceHealth(String sourceName)
Returns the health of the given source.- Parameters:
sourceName
- the sourceName- Returns:
- the health for a particular source
-
getSourceHealthMap
public Map<String,SourceHealth> getSourceHealthMap()
Returns the health information for all sources keyed by sourceName.- Returns:
- the health information for all sources keyed by sourceName
-
-