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 theCounterInterface. 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 protectedAbstractCounter(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.StringgetHelpMessage()Returns the help message for the counter.java.lang.StringgetLocalizedHelpMessage(java.util.Locale locale)java.lang.StringgetLocalizedName(java.util.Locale locale)java.lang.StringgetName()Returns the name of the counter.InstancegetOwnerInstance()Returns theInstanceto which this counter belongs to.abstract CounterDatagetValue()Returns aCounterDataobject containing the last data value collected for this counter.abstract CounterDataListgetValues()Returns a counter data list.booleanisLogged()Conveys if logging is enabled for this counter.booleanisLoggedToStats()Conveys if logging to Statistic is enabled for this counter.java.lang.StringtoString()-
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:CounterReturns aCounterDataobject containing the last data value collected for this counter. Note that the counter must be monitored in order for this to exist.- Specified by:
getValuein interfaceCounter- Returns:
- A
CounterDataobject containing the last data value collected. - Throws:
java.lang.UnsupportedOperationException
-
getValues
public abstract CounterDataList getValues() throws java.lang.UnsupportedOperationException
Description copied from interface:CounterReturns 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 thePerformanceMonitorManagerusingPerformanceMonitorManager.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:CounterReturns the name of the counter.
-
getOwnerInstance
public Instance getOwnerInstance()
Description copied from interface:CounterReturns theInstanceto which this counter belongs to.- Specified by:
getOwnerInstancein interfaceCounter- Returns:
- The instance to which this counter belongs to.
-
getHelpMessage
public java.lang.String getHelpMessage()
Description copied from interface:CounterReturns the help message for the counter. This is an optional string containing additional information about the counter.- Specified by:
getHelpMessagein interfaceCounter- Returns:
- The help message for the counter, if one exists.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isLogged
public boolean isLogged()
Description copied from interface:CounterConveys if logging is enabled for this counter.
-
isLoggedToStats
public boolean isLoggedToStats()
Description copied from interface:CounterConveys if logging to Statistic is enabled for this counter.- Specified by:
isLoggedToStatsin 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)
-
-