Class TimeseriesPersistOperationBuilder
- java.lang.Object
-
- org.opennms.netmgt.timeseries.samplewrite.TimeseriesPersistOperationBuilder
-
- All Implemented Interfaces:
PersistOperationBuilder
public class TimeseriesPersistOperationBuilder extends java.lang.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, java.lang.String groupName, java.util.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.java.lang.String
getName()
Used to identify the builder in log messages in an exception is thrown during a call to commit().java.util.List<org.opennms.integration.api.v1.timeseries.Sample>
getSamplesToInsert()
void
persistStringAttribute(ResourcePath path, java.lang.String key, java.lang.String value)
Persists a String attribute that is associated to a ResourcePath (resourceId)void
persistStringAttributeForMetricLevel(ResourcePath path, java.lang.String metricName, java.lang.String key, java.lang.String value)
Persists a String attribute that is associated to a Metric (resourceId & name)void
setAttributeMetadata(java.lang.String metricIdentifier, java.lang.String name)
void
setAttributeValue(CollectionAttributeType attributeType, java.lang.Number value)
void
setTimeKeeper(TimeKeeper timeKeeper)
setTimeKeeper
-
-
-
Constructor Detail
-
TimeseriesPersistOperationBuilder
public TimeseriesPersistOperationBuilder(TimeseriesWriter writer, RrdRepository repository, ResourceIdentifier resource, java.lang.String groupName, java.util.Set<org.opennms.integration.api.v1.timeseries.Tag> configuredAdditionalMetaTags, com.codahale.metrics.MetricRegistry metricRegistry)
-
-
Method Detail
-
getName
public java.lang.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, java.lang.Number value)
- Specified by:
setAttributeValue
in interfacePersistOperationBuilder
-
persistStringAttribute
public void persistStringAttribute(ResourcePath path, java.lang.String key, java.lang.String value)
Persists a String attribute that is associated to a ResourcePath (resourceId)
-
persistStringAttributeForMetricLevel
public void persistStringAttributeForMetricLevel(ResourcePath path, java.lang.String metricName, java.lang.String key, java.lang.String value)
Persists a String attribute that is associated to a Metric (resourceId & name)
-
setAttributeMetadata
public void setAttributeMetadata(java.lang.String metricIdentifier, java.lang.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 java.util.List<org.opennms.integration.api.v1.timeseries.Sample> getSamplesToInsert()
-
setTimeKeeper
public void setTimeKeeper(TimeKeeper timeKeeper)
setTimeKeeper
- Parameters:
timeKeeper
- aTimeKeeper
object.
-
-