public abstract class

AbstractCounter

extends Object
implements Counter
java.lang.Object
   ↳ com.microstrategy.web.objects.admin.monitors.AbstractCounter

Class Overview

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.

Summary

Protected Constructors
AbstractCounter(AbstractInstance _ownerInstance, String _name, String _helpMessage)
Public Methods
String getHelpMessage()
Returns the help message for the counter.
String getLocalizedHelpMessage(Locale locale)
Returns localized help message.
String getLocalizedName(Locale locale)
Returns the localized name of the counter
String getName()
Returns the name of the counter.
Instance getOwnerInstance()
Returns the Instance to which this counter belongs to.
abstract CounterData getValue()
Returns a CounterData 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.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.microstrategy.web.objects.admin.monitors.Counter

Protected Constructors

protected AbstractCounter (AbstractInstance _ownerInstance, String _name, String _helpMessage)

Public Methods

public String getHelpMessage ()

Returns the help message for the counter. This is an optional string containing additional information about the counter.

Returns
  • The help message for the counter, if one exists.

public String getLocalizedHelpMessage (Locale locale)

Returns localized help message.

Parameters
locale Locale The locale to localize to.
Returns
  • String The localized help message.

public String getLocalizedName (Locale locale)

Returns the localized name of the counter

Parameters
locale Locale The locale to localize to.
Returns
  • String The localized counter name.

public String getName ()

Returns the name of the counter.

Returns
  • The name of the counter.

public Instance getOwnerInstance ()

Returns the Instance to which this counter belongs to.

Returns
  • The instance to which this counter belongs to.

public abstract CounterData getValue ()

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.

Returns
  • A CounterData object containing the last data value collected.
Throws
UnsupportedOperationException

public abstract CounterDataList getValues ()

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 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 setListRefresh(int) till the archive length equals the historySize set.

Returns
  • CounterDataList the counter data list.
Throws
UnsupportedOperationException

public boolean isLogged ()

Conveys if logging is enabled for this counter.

Returns
  • boolean True if logging is enabled for this counter.

public boolean isLoggedToStats ()

Conveys if logging to Statistic is enabled for this counter.

Returns
  • boolean True if logging to Statistic is enabled for this counter.

public String toString ()