org.opennms.netmgt.collectd
Class PersistOperationBuilder

java.lang.Object
  extended by org.opennms.netmgt.collectd.PersistOperationBuilder

public class PersistOperationBuilder
extends Object

PersistOperationBuilder class.

Version:
$Id: $
Author:
ranger

Field Summary
static int MAX_DS_NAME_LENGTH
          Constant MAX_DS_NAME_LENGTH=19
 
Constructor Summary
PersistOperationBuilder(RrdRepository repository, ResourceIdentifier resource, String rrdName)
          Constructor for PersistOperationBuilder.
 
Method Summary
 void commit()
          commit
 void declareAttribute(AttributeDefinition attrType)
          declareAttribute
 String getName()
          getName
 RrdRepository getRepository()
          getRepository
 TimeKeeper getTimeKeeper()
          getTimeKeeper
static String mapType(String objectType)
          Static method which takes a MIB object type (counter, counter32, octetstring, etc...) and returns the appropriate RRD data type.
 void setAttributeValue(AttributeDefinition attrType, String value)
          setAttributeValue
 void setTimeKeeper(TimeKeeper timeKeeper)
          setTimeKeeper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_DS_NAME_LENGTH

public static final int MAX_DS_NAME_LENGTH
Constant MAX_DS_NAME_LENGTH=19

See Also:
Constant Field Values
Constructor Detail

PersistOperationBuilder

public PersistOperationBuilder(RrdRepository repository,
                               ResourceIdentifier resource,
                               String rrdName)

Constructor for PersistOperationBuilder.

Parameters:
repository - a RrdRepository object.
resource - a ResourceIdentifier object.
rrdName - a String object.
Method Detail

getRepository

public RrdRepository getRepository()

getRepository

Returns:
a RrdRepository object.

declareAttribute

public void declareAttribute(AttributeDefinition attrType)

declareAttribute

Parameters:
attrType - a AttributeDefinition object.

setAttributeValue

public void setAttributeValue(AttributeDefinition attrType,
                              String value)

setAttributeValue

Parameters:
attrType - a AttributeDefinition object.
value - a String object.

mapType

public static String mapType(String objectType)
Static method which takes a MIB object type (counter, counter32, octetstring, etc...) and returns the appropriate RRD data type. If the object type cannot be mapped to an RRD type, null is returned. RRD only supports integer data so MIB objects of type 'octetstring' are not supported.

Parameters:
objectType - - MIB object type to be mapped.
Returns:
RRD type string or NULL object type is not supported.

commit

public void commit()
            throws RrdException

commit

Throws:
RrdException - if any.

getName

public String getName()

getName

Returns:
a String object.

getTimeKeeper

public TimeKeeper getTimeKeeper()

getTimeKeeper

Returns:
a TimeKeeper object.

setTimeKeeper

public void setTimeKeeper(TimeKeeper timeKeeper)

setTimeKeeper

Parameters:
timeKeeper - a TimeKeeper object.


Copyright © 2011. All Rights Reserved.