Interface CounterDataList


  • public interface CounterDataList
    Since:
    MicroStrategy Web 7.5.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Enumeration elements()
      returns an enumeration of the archived data values.
      CounterData get​(int index)
      returns the CounterData object at the index passed.
      java.lang.String getDataValue​(int index)
      returns the data value (from the data list archive) at the index passed.
      CounterData getStatistics​(int statType)
      Returns a statistical value computed using the archived values.
      java.util.Date getTimeStamp​(int index)
      returns the time stamp for the data value (in the data list archive) at the index passed.
      int size()
      returns the number of data values archived in this data list.
    • Method Detail

      • get

        CounterData get​(int index)
        returns the CounterData object at the index passed. Note that there are shortcut methods to read the data value/timestamp on the counter data at an index. The short cut methods are getDataValue(int), getTimeStamp(int). The shortcuts methods bypass creation of CounterData objects (as they return the values directly). So, if the purpose of the caller is only to display/log the data value/timestamp, then the shortcut methods should be preferred. Also, Note that the index is 0 based. Smaller the index, older the value. Thus, the 0th index would return the oldest counter data in the archive, and the highest index (equals the size of the data list - 1) would return the latest data value in the archive.
        Parameters:
        index - the index of the counter data object desired.
        Returns:
        CounterData the counter data object.
      • size

        int size()
        returns the number of data values archived in this data list. The data values are ordered from oldest to the latest values.
        Returns:
        int the number of data values arvchived in the data list.
      • elements

        java.util.Enumeration elements()
        returns an enumeration of the archived data values. The enumeration contains CounterData objects ordered from oldest to the most recent values.
        Returns:
        Enumeration the enumeration of the archived data values.
      • getStatistics

        CounterData getStatistics​(int statType)
        Returns a statistical value computed using the archived values. The possible statistic types are listed in EnumWebMonitorStatistics.
        Parameters:
        statType - the type of statistics desired.
        Returns:
        CounterData the Counter data object with the computed stats.
      • getDataValue

        java.lang.String getDataValue​(int index)
        returns the data value (from the data list archive) at the index passed. This shortcut methods bypasses creation of CounterData objects (as it returns the value directly). So, if the purpose of the caller is only to display/log the data value, this shortcut methods should be preferred over get(int). Also, Note that the index is 0 based. Smaller the index, older the value. Thus, the 0th index would return the oldest data value in the archive, and the highest index (equals the size of the data list - 1) would return the latest data value in the archive.
        Parameters:
        index - the index of the data value desired.
        Returns:
        String the data value.
      • getTimeStamp

        java.util.Date getTimeStamp​(int index)
        returns the time stamp for the data value (in the data list archive) at the index passed. This shortcut methods bypasses creation of CounterData objects (as it returns the time stamp directly as a Data object). So, if the purpose of the caller is only to display/log the data value/timestamp, this shortcut methods should be preferred over get(int). Also, Note that the index is 0 based. Smaller the index, older the value. Thus, the 0th index would return the timestamp for the oldest data value in the archive, and the highest index (equals the size of the data list - 1) would return the timestamp for the latest data value in the archive.
        Parameters:
        index - the index of the timestamp desired.
        Returns:
        Date the timestamp for the index passed.