Class AbstractCounter
- java.lang.Object
-
- com.microstrategy.web.objects.admin.monitors.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 theCounter
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 Summary
Constructors Modifier Constructor Description protected
AbstractCounter(AbstractInstance _ownerInstance, java.lang.String _name, java.lang.String _helpMessage)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getHelpMessage()
Returns the help message for the counter.java.lang.String
getLocalizedHelpMessage(java.util.Locale locale)
java.lang.String
getLocalizedName(java.util.Locale locale)
java.lang.String
getName()
Returns the name of the counter.Instance
getOwnerInstance()
Returns theInstance
to which this counter belongs to.abstract CounterData
getValue()
Returns aCounterData
object containing the last data value collected for this counter.abstract CounterDataList
getValues()
Returns a counter data list.boolean
isLogged()
Conveys if logging is enabled for this counter.boolean
isLoggedToStats()
Conveys if logging to Statistic is enabled for this counter.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.objects.admin.monitors.Counter
getLocalizedHelpMessage, getLocalizedName
-
-
-
-
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 aCounterData
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 interfaceCounter
- 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 thePerformanceMonitorManager
usingPerformanceMonitorManager.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 byPerformanceMonitorManager.setListRefresh(int)
till the archive length equals the historySize set.
-
getName
public java.lang.String getName()
Description copied from interface:Counter
Returns the name of the counter.
-
getOwnerInstance
public Instance getOwnerInstance()
Description copied from interface:Counter
Returns theInstance
to which this counter belongs to.- Specified by:
getOwnerInstance
in interfaceCounter
- 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 interfaceCounter
- Returns:
- The help message for the counter, if one exists.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isLogged
public boolean isLogged()
Description copied from interface:Counter
Conveys if logging is enabled for this counter.
-
isLoggedToStats
public boolean isLoggedToStats()
Description copied from interface:Counter
Conveys if logging to Statistic is enabled for this counter.- Specified by:
isLoggedToStats
in interfaceCounter
- 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)
-
-