Class TimeseriesPersistOperationBuilder
- java.lang.Object
-
- org.opennms.netmgt.timeseries.samplewrite.TimeseriesPersistOperationBuilder
-
- All Implemented Interfaces:
PersistOperationBuilder
public class TimeseriesPersistOperationBuilder extends Object implements PersistOperationBuilder
Used to collect attribute values and meta-data for a given resource and persist these via theTimeseriesWriter
oncommit()
.- Author:
- jwhite
-
-
Constructor Summary
Constructors Constructor Description TimeseriesPersistOperationBuilder(TimeseriesWriter writer, RrdRepository repository, ResourceIdentifier resource, String groupName, Set<org.opennms.integration.api.v1.timeseries.Tag> configuredAdditionalMetaTags, com.codahale.metrics.MetricRegistry metricRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
commit()
Persists the attribute values and meta-data.String
getName()
Used to identify the builder in log messages in an exception is thrown during a call to commit().List<org.opennms.integration.api.v1.timeseries.Sample>
getSamplesToInsert()
void
persistStringAttribute(ResourcePath path, String key, String value)
Persists a String attribute that is associated to a ResourcePath (resourceId)void
persistStringAttributeForMetricLevel(ResourcePath path, String metricName, String key, String value)
Persists a String attribute that is associated to a Metric (resourceId & name)void
setAttributeMetadata(String metricIdentifier, String name)
void
setAttributeValue(CollectionAttributeType attributeType, Number value)
void
setTimeKeeper(TimeKeeper timeKeeper)
setTimeKeeper
-
-
-
Constructor Detail
-
TimeseriesPersistOperationBuilder
public TimeseriesPersistOperationBuilder(TimeseriesWriter writer, RrdRepository repository, ResourceIdentifier resource, String groupName, Set<org.opennms.integration.api.v1.timeseries.Tag> configuredAdditionalMetaTags, com.codahale.metrics.MetricRegistry metricRegistry)
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:PersistOperationBuilder
Used to identify the builder in log messages in an exception is thrown during a call to commit().- Specified by:
getName
in interfacePersistOperationBuilder
-
setAttributeValue
public void setAttributeValue(CollectionAttributeType attributeType, Number value)
- Specified by:
setAttributeValue
in interfacePersistOperationBuilder
-
persistStringAttribute
public void persistStringAttribute(ResourcePath path, String key, String value)
Persists a String attribute that is associated to a ResourcePath (resourceId)
-
persistStringAttributeForMetricLevel
public void persistStringAttributeForMetricLevel(ResourcePath path, String metricName, String key, String value)
Persists a String attribute that is associated to a Metric (resourceId & name)
-
setAttributeMetadata
public void setAttributeMetadata(String metricIdentifier, String name)
- Specified by:
setAttributeMetadata
in interfacePersistOperationBuilder
-
commit
public void commit()
Description copied from interface:PersistOperationBuilder
Persists the attribute values and meta-data.- Specified by:
commit
in interfacePersistOperationBuilder
-
getSamplesToInsert
public List<org.opennms.integration.api.v1.timeseries.Sample> getSamplesToInsert()
-
setTimeKeeper
public void setTimeKeeper(TimeKeeper timeKeeper)
setTimeKeeper
- Parameters:
timeKeeper
- aTimeKeeper
object.
-
-