public class NewtsPersistOperationBuilder extends Object implements PersistOperationBuilder
NewtsWriter on commit().| Constructor and Description |
|---|
NewtsPersistOperationBuilder(NewtsWriter newtsWriter,
org.opennms.newts.api.Context context,
RrdRepository repository,
ResourceIdentifier resource,
String name) |
| Modifier and Type | Method and 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.newts.api.Sample> |
getSamplesToIndex() |
List<org.opennms.newts.api.Sample> |
getSamplesToInsert() |
TimeKeeper |
getTimeKeeper()
getTimeKeeper
|
static org.opennms.newts.api.MetricType |
mapType(String objectType) |
void |
persistStringAttribute(ResourcePath path,
String key,
String value) |
void |
setAttributeMetadata(String metricIdentifier,
String name) |
void |
setAttributeValue(CollectionAttributeType attributeType,
Number value) |
void |
setTimeKeeper(TimeKeeper timeKeeper)
setTimeKeeper
|
public NewtsPersistOperationBuilder(NewtsWriter newtsWriter, org.opennms.newts.api.Context context, RrdRepository repository, ResourceIdentifier resource, String name)
public String getName()
PersistOperationBuildergetName in interface PersistOperationBuilderpublic void setAttributeValue(CollectionAttributeType attributeType, Number value)
setAttributeValue in interface PersistOperationBuilderpublic void persistStringAttribute(ResourcePath path, String key, String value)
public void setAttributeMetadata(String metricIdentifier, String name)
setAttributeMetadata in interface PersistOperationBuilderpublic void commit()
throws PersistException
PersistOperationBuildercommit in interface PersistOperationBuilderPersistException - if an error occurs while persisting the attributepublic List<org.opennms.newts.api.Sample> getSamplesToInsert()
public List<org.opennms.newts.api.Sample> getSamplesToIndex()
public static org.opennms.newts.api.MetricType mapType(String objectType)
public TimeKeeper getTimeKeeper()
getTimeKeeper
TimeKeeper object.public void setTimeKeeper(TimeKeeper timeKeeper)
setTimeKeeper
timeKeeper - a TimeKeeper object.Copyright © 2020. All rights reserved.