public class DefaultStatisticsData extends java.lang.Object implements StatisticsData
| Constructor and Description |
|---|
DefaultStatisticsData() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addDataCollector(java.lang.String name)
Method adds a new collector with key name.
|
void |
balanceDataLevels(java.lang.String name)
Method checks, if ticks held in different levels still observe the defined borders.
|
boolean |
containsDataCollector(java.lang.String name)
Find out, whether the Data-Collector identified by name is registered.
|
java.lang.Object[][] |
getAllData(java.lang.String name,
int maxTicks,
long utcOffset)
Get all available data of the Data-Collector defined by name.
|
float |
getCollectorValue(java.lang.String name,
long timestamp)
Get one value of the collector called name at the given timestamp.
|
int |
getCurrentSize(java.lang.String name)
Get the current size of the data-collector called name.
|
int[] |
getLevelSizes(java.lang.String name)
Returns the tick-amount in the different level-sizes as int-Array.
|
java.lang.Object[][] |
getTickAsArray(java.lang.String name,
long period,
int maxTicks,
long utcOffset)
Get time-period of length period in ms from Collector name as Object Array.
|
java.lang.Object[][] |
getTimePeriodData(java.lang.String name,
long start,
long end,
long utcOffset)
Get the data of a speciific period of time from start till end.
|
protected void |
printStats(java.lang.String name) |
boolean |
putData(java.lang.String name,
long timestamp,
float value)
Method for putting one collected dataset consisting of a timestamp and a value.
|
boolean |
removeDataCollector(java.lang.String name)
Removes a registered Data-Collector, defined by name.
|
void |
setSizeLvl1Ms(long ms)
Setter for the time-period ticks are stored in level-1.
|
void |
setSizeLvl2Ms(long ms)
Setter for the time-period, ticks are stored in level-2.
|
void |
setSizeLvl3Ms(long ms)
Setter for the time-period, ticks are stored in level-3.
|
protected void |
trimAndAggregate(java.util.NavigableMap<java.lang.Long,java.lang.Float> fromMap,
java.util.NavigableMap<java.lang.Long,java.lang.Float> toMap,
long now,
long millisToKeep,
int ticksToRemoveAtOnce) |
public boolean addDataCollector(java.lang.String name)
StatisticsDataaddDataCollector in interface StatisticsDataname - The name of the collector.public boolean removeDataCollector(java.lang.String name)
StatisticsDataremoveDataCollector in interface StatisticsDataname - String The name, defining the collector to be removed.public boolean containsDataCollector(java.lang.String name)
StatisticsDatacontainsDataCollector in interface StatisticsDataname - String The name identifying the Data-Collector.public boolean putData(java.lang.String name,
long timestamp,
float value)
StatisticsDataputData in interface StatisticsDataname - The name of the data that are collected.timestamp - The time when the value has been collected, as milliseconds passed since 01.01.1970.value - The value that has been collected at specified time.protected void printStats(java.lang.String name)
public void balanceDataLevels(java.lang.String name)
StatisticsDatabalanceDataLevels in interface StatisticsDataname - The name of the Collector that should be balanced.protected void trimAndAggregate(java.util.NavigableMap<java.lang.Long,java.lang.Float> fromMap,
java.util.NavigableMap<java.lang.Long,java.lang.Float> toMap,
long now,
long millisToKeep,
int ticksToRemoveAtOnce)
public java.lang.Object[][] getTimePeriodData(java.lang.String name,
long start,
long end,
long utcOffset)
StatisticsDatagetTimePeriodData in interface StatisticsDataname - The name of the data you want to get.start - The start-timestamp for the data.end - The end-timestamp for the data.utcOffset - The difference between local client time and UTC-time (server time) in ms.public java.lang.Object[][] getAllData(java.lang.String name,
int maxTicks,
long utcOffset)
StatisticsDatagetAllData in interface StatisticsDataname - String The name defining the Data-Collector you want to get the Data from.maxTicks - The maximum number of ticks that will be returned.utcOffset - The difference between local client time and UTC-time (server time) in ms.public java.lang.Object[][] getTickAsArray(java.lang.String name,
long period,
int maxTicks,
long utcOffset)
StatisticsDatagetTickAsArray in interface StatisticsDataname - The name identifying the DataCollector, which data is returned.period - Defines how long into past the time period should reach from now.maxTicks - Specifies the maximum number of Ticks that should be returned.utcOffset - The difference between local client time and UTC-time (server time) in ms.public int getCurrentSize(java.lang.String name)
StatisticsDatagetCurrentSize in interface StatisticsDatapublic int[] getLevelSizes(java.lang.String name)
name - The name of the Collector, the level-sizes should be returned for.public void setSizeLvl1Ms(long ms)
public void setSizeLvl2Ms(long ms)
public void setSizeLvl3Ms(long ms)
public float getCollectorValue(java.lang.String name,
long timestamp)
StatisticsDatagetCollectorValue in interface StatisticsDataname - The name of the collector.timestamp - The timestamp you want to have the value of.Copyright © 2018 SAP SE. All Rights Reserved.