Class ApplianceAggregateInfo
- java.lang.Object
-
- org.epics.archiverappliance.config.ApplianceAggregateInfo
-
public class ApplianceAggregateInfo extends Object
POJO facilitating various optimizations for BPL that uses appliance wide information. The correct values for most of this is obtained by iterating thru the PVTypeInfo's and aggregating them. To improve performance for business logic that takes the entire appliance into consideration, a few aggregated parameters are stored and maintained here. There are no transactional guarantees with the information aggregated here; if the perfect/best information is desired, walk thru the PVTypeInfos. This is available within the appliance for that appliance.- Author:
- mshankar
-
-
Constructor Summary
Constructors Constructor Description ApplianceAggregateInfo()
-
Method Summary
Modifier and Type Method Description void
addInfoForPV(String pvName, PVTypeInfo typeInfo, ConfigService configService)
ApplianceAggregateInfo
clone()
ApplianceAggregateInfo
getDifference(ApplianceAggregateInfo other)
This returns a new ApplianceAggregateInfo that is the difference between this info and the other info.double
getTotalEventRate()
Gets the aggregated total computedEventRate for this appliancedouble
getTotalPVCount()
Gets the aggregated pv count for this appliance.HashMap<String,Long>
getTotalStorageImpact()
The storage impact is the impact of a PV on the particular store.double
getTotalStorageRate()
Gets the aggregated total computedStorageRate for this appliancevoid
setTotalEventRate(double totalEventRate)
void
setTotalPVCount(double totalPVCount)
void
setTotalStorageImpact(HashMap<String,String> totalStorageImpact)
void
setTotalStorageRate(double totalStorageRate)
-
-
-
Method Detail
-
clone
public ApplianceAggregateInfo clone()
-
addInfoForPV
public void addInfoForPV(String pvName, PVTypeInfo typeInfo, ConfigService configService)
-
getTotalStorageRate
public double getTotalStorageRate()
Gets the aggregated total computedStorageRate for this appliance- Returns:
- totalStorageRate
-
getTotalEventRate
public double getTotalEventRate()
Gets the aggregated total computedEventRate for this appliance- Returns:
- totalEventRate
-
getTotalPVCount
public double getTotalPVCount()
Gets the aggregated pv count for this appliance.- Returns:
- totalPVCount
-
setTotalStorageRate
public void setTotalStorageRate(double totalStorageRate)
-
setTotalEventRate
public void setTotalEventRate(double totalEventRate)
-
setTotalPVCount
public void setTotalPVCount(double totalPVCount)
-
getTotalStorageImpact
public HashMap<String,Long> getTotalStorageImpact()
The storage impact is the impact of a PV on the particular store. It is the product of the estimated storage rate and the partition granularity of the source. This returns the aggregated impact on the various stores on this appliance indexed by the identity of the store.- Returns:
- totalStorageImpact
-
setTotalStorageImpact
public void setTotalStorageImpact(HashMap<String,String> totalStorageImpact)
-
getDifference
public ApplianceAggregateInfo getDifference(ApplianceAggregateInfo other)
This returns a new ApplianceAggregateInfo that is the difference between this info and the other info. Used to maintain the delta of ApplianceAggregateInfo's between the periodic fetches of the CapacityPlanningMetricsPerApplianceForPV- Parameters:
other
- ApplianceAggregateInfo- Returns:
- ApplianceAggregateInfo
-
-