Package ru.funsys.avalanche.managment
Class MethodStatistic
- java.lang.Object
-
- ru.funsys.avalanche.jmx.JMXAbstractBean
-
- ru.funsys.avalanche.managment.MethodStatistic
-
- All Implemented Interfaces:
DynamicMBean
@JMXBean(locale=true,attributes={@JMXAttribute(name="average",type="long",locale=true),@JMXAttribute(name="current",type="long",locale=true)}) public class MethodStatistic extends JMXAbstractBean
- Author:
- Валерий Лиховских
-
-
Field Summary
Fields Modifier and Type Field Description static SimpleDateFormatDATE_FORMATstatic StringMESSAGEstatic longMIN_VALUE_THRESHOLD-
Fields inherited from class ru.funsys.avalanche.jmx.JMXAbstractBean
GET, IS, NULL, SET
-
-
Constructor Summary
Constructors Constructor Description MethodStatistic(FunctionStatistic functionStatistic, String methodName, long threshold)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetAverage()longgetCounter()intgetCurrent()Получить текущее число выполняемых запросовlonggetErrors()Получить количество ошибок вызова метода.StringgetFirstDate()StringgetLastDate()longgetMax()StringgetMaxDate()longgetMin()StringgetMinDate()longgetSumma()longgetThreshold()voidsetThreshold(long threshold)voidstart(Long timestamp)voidstop(Long timestamp, long value)voidstop(Long timestamp, Throwable throwable)-
Methods inherited from class ru.funsys.avalanche.jmx.JMXAbstractBean
getAttribute, getAttributes, getConstructorInfo, getMBeanInfo, getNotificationInfo, getOperationInfo, invoke, setAttribute, setAttributes
-
-
-
-
Field Detail
-
DATE_FORMAT
public static final SimpleDateFormat DATE_FORMAT
-
MIN_VALUE_THRESHOLD
public static final long MIN_VALUE_THRESHOLD
- See Also:
- Constant Field Values
-
MESSAGE
public static final String MESSAGE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MethodStatistic
public MethodStatistic(FunctionStatistic functionStatistic, String methodName, long threshold)
-
-
Method Detail
-
getCounter
public long getCounter()
-
getMin
public long getMin()
-
getMax
public long getMax()
-
getAverage
public long getAverage()
-
getErrors
public long getErrors()
Получить количество ошибок вызова метода.
-
getCurrent
public int getCurrent()
Получить текущее число выполняемых запросов- Returns:
- число запросов за период
-
getSumma
public long getSumma()
-
start
public void start(Long timestamp)
- Parameters:
timestamp- временная метка события вызова функции
-
stop
public void stop(Long timestamp, long value)
-
stop
public void stop(Long timestamp, Throwable throwable)
- Parameters:
timestamp- временная метка начала выполнения запросаthrowable- исключение, возникшее при выполнении запроса
-
getMinDate
public String getMinDate()
-
getMaxDate
public String getMaxDate()
-
getLastDate
public String getLastDate()
-
getFirstDate
public String getFirstDate()
-
setThreshold
@JMXOperation(locale=true) public void setThreshold(@JMXParameter(name="threshold",locale=true) long threshold)
-
getThreshold
public long getThreshold()
-
-