Class LatencyCollectionAttribute
- java.lang.Object
-
- org.opennms.netmgt.collection.api.LatencyCollectionAttribute
-
- All Implemented Interfaces:
CollectionAttribute
,CollectionVisitable
,Persistable
public class LatencyCollectionAttribute extends java.lang.Object implements CollectionAttribute
LatencyCollectionAttribute class.
- Version:
- $Id: $
- Author:
- Alejandro Galue
-
-
Constructor Summary
Constructors Constructor Description LatencyCollectionAttribute(LatencyCollectionResource resource, LatencyCollectionAttributeType type, java.lang.String name, java.lang.Double value)
Constructor for LatencyCollectionAttribute.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LatencyCollectionAttributeType
getAttributeType()
getAttributeTypejava.lang.String
getMetricIdentifier()
Get the metric identifier for the attribute to be used for NRTG collectionjava.lang.String
getName()
getNamejava.lang.Double
getNumericValue()
getNumericValueCollectionResource
getResource()
getResourcejava.lang.String
getStringValue()
getStringValueAttributeType
getType()
getTypeboolean
shouldPersist(ServiceParameters params)
Determines whether the attribute should be persisted.void
storeAttribute(Persister persister)
Stores the attribute using the persister.java.lang.String
toString()
void
visit(CollectionSetVisitor visitor)
Provide a way to visit all the values in the CollectionSet, for any appropriate purposes (persisting, thresholding, or others) The expectation is that calling this method will ultimately call visitResource, visitGroup and visitAttribute (as appropriate)
-
-
-
Constructor Detail
-
LatencyCollectionAttribute
public LatencyCollectionAttribute(LatencyCollectionResource resource, LatencyCollectionAttributeType type, java.lang.String name, java.lang.Double value)
Constructor for LatencyCollectionAttribute.
- Parameters:
resource
- aLatencyCollectionResource
object.type
- aLatencyCollectionAttributeType
object.name
- aString
object.value
- aDouble
object.
-
-
Method Detail
-
getAttributeType
public LatencyCollectionAttributeType getAttributeType()
getAttributeType
- Specified by:
getAttributeType
in interfaceCollectionAttribute
- Returns:
- a
LatencyCollectionAttributeType
object.
-
getName
public java.lang.String getName()
getName
- Specified by:
getName
in interfaceCollectionAttribute
- Returns:
- a
String
object.
-
getNumericValue
public java.lang.Double getNumericValue()
getNumericValue
- Specified by:
getNumericValue
in interfaceCollectionAttribute
- Returns:
- a
String
object.
-
getResource
public CollectionResource getResource()
getResource
- Specified by:
getResource
in interfaceCollectionAttribute
- Returns:
- a
CollectionResource
object.
-
getStringValue
public java.lang.String getStringValue()
getStringValue
- Specified by:
getStringValue
in interfaceCollectionAttribute
- Returns:
- a
String
object.
-
getType
public AttributeType getType()
getType
- Specified by:
getType
in interfaceCollectionAttribute
- Returns:
- a
AttributeType
object.
-
shouldPersist
public boolean shouldPersist(ServiceParameters params)
Determines whether the attribute should be persisted.- Specified by:
shouldPersist
in interfacePersistable
- Parameters:
params
- aServiceParameters
object.- Returns:
- a boolean.
-
storeAttribute
public void storeAttribute(Persister persister)
Stores the attribute using the persister. Not sure this should be here...- Specified by:
storeAttribute
in interfaceCollectionAttribute
- Parameters:
persister
- aorg.opennms.netmgt.collectd.Persister
object.
-
visit
public void visit(CollectionSetVisitor visitor)
Provide a way to visit all the values in the CollectionSet, for any appropriate purposes (persisting, thresholding, or others) The expectation is that calling this method will ultimately call visitResource, visitGroup and visitAttribute (as appropriate)- Specified by:
visit
in interfaceCollectionVisitable
- Parameters:
visitor
- aCollectionSetVisitor
object.
-
getMetricIdentifier
public java.lang.String getMetricIdentifier()
Description copied from interface:CollectionAttribute
Get the metric identifier for the attribute to be used for NRTG collection- Specified by:
getMetricIdentifier
in interfaceCollectionAttribute
- Returns:
- the metric identifier
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-