Class AbstractCounter

  • All Implemented Interfaces:
    Counter

    public abstract class AbstractCounter
    extends java.lang.Object
    implements Counter
    The AbstractCounter class is a base class which can be subclassed to implement the Counter Interface. Most usages of the API will not require for the user to create a subclass of this class.
    Since:
    MicroStrategy Web 7.5.0
    • Constructor Detail

      • AbstractCounter

        protected AbstractCounter​(AbstractInstance _ownerInstance,
                                  java.lang.String _name,
                                  java.lang.String _helpMessage)
    • Method Detail

      • getValue

        public abstract CounterData getValue()
                                      throws java.lang.UnsupportedOperationException
        Description copied from interface: Counter
        Returns a CounterData object containing the last data value collected for this counter. Note that the counter must be monitored in order for this to exist.
        Specified by:
        getValue in interface Counter
        Returns:
        A CounterData object containing the last data value collected.
        Throws:
        java.lang.UnsupportedOperationException
      • getValues

        public abstract CounterDataList getValues()
                                           throws java.lang.UnsupportedOperationException
        Description copied from interface: Counter
        Returns a counter data list. The counter data list represents a snapshot of the data values history, at the time when this method is called. Thus, to get updated archived values, this method can be used periodically. The number of data values archived depends on the value of historySize set on the PerformanceMonitorManager using PerformanceMonitorManager.setHistorySize(int). Note that if the historySize is increased, each subsequent call to this method will return snapshots whose size (length of their data values archive) reflects incremental growth with each new data collection from IServer (happens at times fixed by PerformanceMonitorManager.setListRefresh(int) till the archive length equals the historySize set.
        Specified by:
        getValues in interface Counter
        Returns:
        CounterDataList the counter data list.
        Throws:
        java.lang.UnsupportedOperationException
      • getName

        public java.lang.String getName()
        Description copied from interface: Counter
        Returns the name of the counter.
        Specified by:
        getName in interface Counter
        Returns:
        The name of the counter.
      • getOwnerInstance

        public Instance getOwnerInstance()
        Description copied from interface: Counter
        Returns the Instance to which this counter belongs to.
        Specified by:
        getOwnerInstance in interface Counter
        Returns:
        The instance to which this counter belongs to.
      • getHelpMessage

        public java.lang.String getHelpMessage()
        Description copied from interface: Counter
        Returns the help message for the counter. This is an optional string containing additional information about the counter.
        Specified by:
        getHelpMessage in interface Counter
        Returns:
        The help message for the counter, if one exists.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isLogged

        public boolean isLogged()
        Description copied from interface: Counter
        Conveys if logging is enabled for this counter.
        Specified by:
        isLogged in interface Counter
        Returns:
        boolean True if logging is enabled for this counter.
        Since:
        MicroStrategy Web 9.0.0
      • isLoggedToStats

        public boolean isLoggedToStats()
        Description copied from interface: Counter
        Conveys if logging to Statistic is enabled for this counter.
        Specified by:
        isLoggedToStats in interface Counter
        Returns:
        boolean True if logging to Statistic is enabled for this counter.
        Since:
        MicroStrategy Web 9.0.0
      • getLocalizedName

        public java.lang.String getLocalizedName​(java.util.Locale locale)
      • getLocalizedHelpMessage

        public java.lang.String getLocalizedHelpMessage​(java.util.Locale locale)