public abstract class AbstractCollectionAttribute extends Object implements CollectionAttribute
Abstract AbstractCollectionAttribute class.
Modifier and Type | Field and Description |
---|---|
protected CollectionAttributeType |
m_attribType |
protected CollectionResource |
m_resource |
Constructor and Description |
---|
AbstractCollectionAttribute(CollectionAttributeType attribType,
CollectionResource resource) |
Modifier and Type | Method and Description |
---|---|
CollectionAttributeType |
getAttributeType()
getAttributeType
|
String |
getName()
Gets the name of the attribute
|
abstract Number |
getNumericValue()
getNumericValue
|
CollectionResource |
getResource()
getResource
|
abstract String |
getStringValue()
getStringValue
|
AttributeType |
getType()
The type of metric that the attribute represents.
|
boolean |
shouldPersist(ServiceParameters params)
Determines whether the attribute should be persisted.
|
void |
storeAttribute(Persister persister)
Stores the attribute using the persister.
|
void |
visit(CollectionSetVisitor visitor)
Since a
CollectionAttribute is a terminal value, we just visit and
complete it since it doesn't have any "children". |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetricIdentifier
protected final CollectionAttributeType m_attribType
protected final CollectionResource m_resource
public AbstractCollectionAttribute(CollectionAttributeType attribType, CollectionResource resource)
public final CollectionAttributeType getAttributeType()
getAttributeType
getAttributeType
in interface CollectionAttribute
CollectionAttributeType
object.public final CollectionResource getResource()
CollectionAttribute
getResource
getResource
in interface CollectionAttribute
org.opennms.netmgt.config.collector.CollectionResource
object.public final String getName()
CollectionAttribute
getName
in interface CollectionAttribute
public final AttributeType getType()
CollectionAttribute
The type of metric that the attribute represents.
getType
in interface CollectionAttribute
AttributeType
object.public abstract Number getNumericValue()
getNumericValue
getNumericValue
in interface CollectionAttribute
Number
object.public abstract String getStringValue()
getStringValue
getStringValue
in interface CollectionAttribute
String
object.public boolean shouldPersist(ServiceParameters params)
Persistable
shouldPersist
in interface Persistable
params
- a ServiceParameters
object.public void storeAttribute(Persister persister)
storeAttribute
in interface CollectionAttribute
persister
- a org.opennms.netmgt.collectd.Persister
object.public final void visit(CollectionSetVisitor visitor)
CollectionAttribute
is a terminal value, we just visit and
complete it since it doesn't have any "children".visit
in interface CollectionVisitable
visitor
- a CollectionSetVisitor
object.Copyright © 2021. All rights reserved.