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(AttributeType type) |
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()
PersistOperationBuilder
getName
in interface PersistOperationBuilder
public void setAttributeValue(CollectionAttributeType attributeType, Number value)
setAttributeValue
in interface PersistOperationBuilder
public void persistStringAttribute(ResourcePath path, String key, String value)
public void setAttributeMetadata(String metricIdentifier, String name)
setAttributeMetadata
in interface PersistOperationBuilder
public void commit() throws PersistException
PersistOperationBuilder
commit
in interface PersistOperationBuilder
PersistException
- 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(AttributeType type)
public TimeKeeper getTimeKeeper()
getTimeKeeper
TimeKeeper
object.public void setTimeKeeper(TimeKeeper timeKeeper)
setTimeKeeper
timeKeeper
- a TimeKeeper
object.Copyright © 2021. All rights reserved.