Package org.opends.server.api
Class MonitorData
- java.lang.Object
-
- org.opends.server.api.MonitorData
-
@PublicAPI(stability=PRIVATE) public final class MonitorData extends Object
This class is used to hold monitoring data, i.e. a list of attributes. It provides convenient methods to easily build such data.Note:
Creating monitor entries may become a lot easier once we've migrated to the SDK Entry class:Entry entry = ...; entry.addAttribute("stringStat", "aString") .addAttribute("integerStat", 12345) .addAttribute("dnStat", Dn.valueOf("dc=aDN");We could also envisage an annotation based approach where we determine the monitor content from annotated fields/methods in an object.
-
-
Constructor Summary
Constructors Constructor Description MonitorData(Schema schema)Builds a MonitorData object by using the provided schema.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MonitorDataadd(String attrName, Object attrValue)Adds an attribute with the provided name and value.MonitorDataaddAll(String attrName, Iterable<?> attrValues)Adds an attribute with the provided name and values.StringtoString()
-
-
-
Constructor Detail
-
MonitorData
public MonitorData(Schema schema)
Builds a MonitorData object by using the provided schema.- Parameters:
schema- the schema to use when building the monitor data
-
-
Method Detail
-
add
public MonitorData add(String attrName, Object attrValue)
Adds an attribute with the provided name and value.- Parameters:
attrName- the attribute nameattrValue- the attribute value- Returns:
- This
MonitorDataobject.
-
addAll
public MonitorData addAll(String attrName, Iterable<?> attrValues)
Adds an attribute with the provided name and values.- Parameters:
attrName- the attribute nameattrValues- the attribute values- Returns:
- This
MonitorDataobject.
-
-