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 theTimeseriesWriteroncommit().- 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 voidcommit()Persists the attribute values and meta-data.StringgetName()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()voidpersistStringAttribute(ResourcePath path, String key, String value)Persists a String attribute that is associated to a ResourcePath (resourceId)voidpersistStringAttributeForMetricLevel(ResourcePath path, String metricName, String key, String value)Persists a String attribute that is associated to a Metric (resourceId & name)voidsetAttributeMetadata(String metricIdentifier, String name)voidsetAttributeValue(CollectionAttributeType attributeType, Number value)voidsetTimeKeeper(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:PersistOperationBuilderUsed to identify the builder in log messages in an exception is thrown during a call to commit().- Specified by:
getNamein interfacePersistOperationBuilder
-
setAttributeValue
public void setAttributeValue(CollectionAttributeType attributeType, Number value)
- Specified by:
setAttributeValuein 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:
setAttributeMetadatain interfacePersistOperationBuilder
-
commit
public void commit()
Description copied from interface:PersistOperationBuilderPersists the attribute values and meta-data.- Specified by:
commitin interfacePersistOperationBuilder
-
getSamplesToInsert
public List<org.opennms.integration.api.v1.timeseries.Sample> getSamplesToInsert()
-
setTimeKeeper
public void setTimeKeeper(TimeKeeper timeKeeper)
setTimeKeeper
- Parameters:
timeKeeper- aTimeKeeperobject.
-
-