public class BasicStatisticProvider extends java.lang.Object implements StatisticProvider
StatisticProviders.DEFAULT_PRECISION_INFO| Constructor and Description |
|---|
BasicStatisticProvider(java.lang.String group,
java.lang.String name,
java.lang.String[] reportTypes,
java.lang.String mergeType,
boolean hasCurrentValueSupport,
int[][] precisionInfo,
java.lang.String db)
If this constructor is used with
currentValueProvider != null the method
getCurrentValue(com.prosyst.mprm.admin.statistics.Source) shall be overridden. |
BasicStatisticProvider(java.lang.String group,
java.lang.String name,
java.lang.String[] reportTypes,
java.lang.String mergeType,
boolean hasCurrentValueSupport,
java.lang.String db)
If this constructor is used with
currentValueProvider != null the method
getCurrentValue(com.prosyst.mprm.admin.statistics.Source) shall be overridden. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Number |
getCurrentValue(Source source)
Exported as current report if supported.
|
java.lang.String |
getDB()
Returns the DB name that shall be used for storing the information for values of this statistic.
|
java.lang.String |
getGroup()
Returns statistic group.
|
java.lang.String |
getMergeType()
Returns a ReportProvider name that could be used for merging current values on more then one hosts.
|
java.lang.String |
getName()
Returns statistic name.
|
int[][] |
getPrecisionInfo()
In order to save memory/disk the statistic provider keeps the statistics records in samples (period infos) with different precisions.
|
java.lang.String[] |
getReportTypes()
Return the handler for report support.
|
java.lang.String[] |
getSummaryNames()
Returns names of predefined (summary) statistic values.
|
boolean |
hasCurrentValueSupport()
Return the if current value is supported.
|
void |
putSnapshot(Snapshot snapshot)
Shall be called by the extender to put snapshot to all report supports.
|
void |
setUp(Context context)
Sets up the provider.
|
public BasicStatisticProvider(java.lang.String group,
java.lang.String name,
java.lang.String[] reportTypes,
java.lang.String mergeType,
boolean hasCurrentValueSupport,
java.lang.String db)
currentValueProvider != null the method
getCurrentValue(com.prosyst.mprm.admin.statistics.Source) shall be overridden.group - statistic groupname - statistic namereportTypes - the report typemergeType - the merge strategyhasCurrentValueSupport - if has support for current valueprecisionInfo - the precision informationdb - db to be used for persistence.public BasicStatisticProvider(java.lang.String group,
java.lang.String name,
java.lang.String[] reportTypes,
java.lang.String mergeType,
boolean hasCurrentValueSupport,
int[][] precisionInfo,
java.lang.String db)
currentValueProvider != null the method
getCurrentValue(com.prosyst.mprm.admin.statistics.Source) shall be overridden.group - statistic groupname - statistic namereportTypes - the report typemergeType - the merge strategyhasCurrentValueSupport - if has support for current valueprecisionInfo - the precision informationdb - db to be used for persistence.public java.lang.String getGroup()
StatisticProvidergetGroup in interface StatisticProviderpublic java.lang.String getName()
StatisticProvidergetName in interface StatisticProviderpublic java.lang.String[] getReportTypes()
StatisticProvidergetReportTypes in interface StatisticProviderpublic boolean hasCurrentValueSupport()
StatisticProviderhasCurrentValueSupport in interface StatisticProvider#getCurrentValue() shall throw
UnsupportedOperationException.public int[][] getPrecisionInfo()
StatisticProvidernull the default one for the statistics
subsystem is used.getPrecisionInfo in interface StatisticProviderpublic java.lang.String getDB()
StatisticProvidergetDB in interface StatisticProviderpublic void setUp(Context context)
StatisticProvidernull) context.
When the passed context is null the provider MUST stop use the previously set context.setUp in interface StatisticProviderpublic java.lang.String getMergeType()
StatisticProvidergetMergeType in interface StatisticProviderpublic java.lang.Number getCurrentValue(Source source)
StatisticProvidergetCurrentValue in interface StatisticProvidersource - source of the statistic.public java.lang.String[] getSummaryNames()
StatisticProvidergetSummaryNames in interface StatisticProviderpublic void putSnapshot(Snapshot snapshot)
snapshot - snapshotCopyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.