25 package com.sun.corba.se.spi.monitoring; |
25 package com.sun.corba.se.spi.monitoring; |
26 |
26 |
27 import java.util.*; |
27 import java.util.*; |
28 |
28 |
29 /** |
29 /** |
30 * <p> |
30 * @author Hemanth Puttaswamy |
31 * |
31 * |
32 * @author Hemanth Puttaswamy |
|
33 * </p> |
|
34 * <p> |
|
35 * StatisticsMonitoredAttribute is provided as a convenience to collect the |
32 * StatisticsMonitoredAttribute is provided as a convenience to collect the |
36 * Statistics of any entity. The getValue() call will be delegated to the |
33 * Statistics of any entity. The getValue() call will be delegated to the |
37 * StatisticsAccumulator set by the user. |
34 * StatisticsAccumulator set by the user. |
38 * </p> |
|
39 */ |
35 */ |
40 public class StatisticMonitoredAttribute extends MonitoredAttributeBase { |
36 public class StatisticMonitoredAttribute extends MonitoredAttributeBase { |
41 |
37 |
42 |
38 |
43 // Every StatisticMonitoredAttribute will have a StatisticAccumulator. User |
39 // Every StatisticMonitoredAttribute will have a StatisticAccumulator. User |
53 /////////////////////////////////////// |
49 /////////////////////////////////////// |
54 // operations |
50 // operations |
55 |
51 |
56 |
52 |
57 /** |
53 /** |
58 * <p> |
|
59 * Constructs the StaisticMonitoredAttribute, builds the required |
54 * Constructs the StaisticMonitoredAttribute, builds the required |
60 * MonitoredAttributeInfo with Long as the class type and is always |
55 * MonitoredAttributeInfo with Long as the class type and is always |
61 * readonly attribute. |
56 * readonly attribute. |
62 * </p> |
|
63 * <p> |
|
64 * |
57 * |
65 * @param name Of this attribute |
58 * @param name Of this attribute |
66 * </p> |
|
67 * <p> |
|
68 * @return a StatisticMonitoredAttribute |
|
69 * </p> |
|
70 * <p> |
|
71 * @param desc should provide a good description on the kind of statistics |
59 * @param desc should provide a good description on the kind of statistics |
72 * collected, a good example is "Connection Response Time Stats will Provide the |
60 * collected, a good example is "Connection Response Time Stats will Provide the |
73 * detailed stats based on the samples provided from every request completion |
61 * detailed stats based on the samples provided from every request completion |
74 * time" |
62 * time" |
75 * </p> |
|
76 * <p> |
|
77 * @param s is the StatisticsAcumulator that user will use to accumulate the |
63 * @param s is the StatisticsAcumulator that user will use to accumulate the |
78 * samples and this Attribute Object will get the computed statistics values |
64 * samples and this Attribute Object will get the computed statistics values |
79 * from. |
65 * from. |
80 * </p> |
|
81 * <p> |
|
82 * @param mutex using which clearState() and getValue() calls need to be locked. |
66 * @param mutex using which clearState() and getValue() calls need to be locked. |
83 * </p> |
|
84 */ |
67 */ |
85 public StatisticMonitoredAttribute(String name, String desc, |
68 public StatisticMonitoredAttribute(String name, String desc, |
86 StatisticsAccumulator s, Object mutex) |
69 StatisticsAccumulator s, Object mutex) |
87 { |
70 { |
88 super( name ); |
71 super( name ); |