Class CollectionResourceWrapper


  • public class CollectionResourceWrapper
    extends java.lang.Object

    CollectionResourceWrapper class.

    Wraps a CollectionResource with some methods and caching for the efficient application of thresholds (without pulling thresholding code into CollectionResource itself) A fresh instance should be created for each collection cycle (assumptions are made based on that premise)
    Version:
    $Id: $
    Author:
    ranger
    • Constructor Detail

      • CollectionResourceWrapper

        public CollectionResourceWrapper​(java.util.Date collectionTimestamp,
                                         int nodeId,
                                         java.lang.String hostAddress,
                                         java.lang.String serviceName,
                                         RrdRepository repository,
                                         CollectionResource resource,
                                         java.util.Map<java.lang.String,​CollectionAttribute> attributes,
                                         ResourceStorageDao resourceStorageDao,
                                         IfLabel ifLabelDao,
                                         java.lang.Long sequenceNumber)

        Constructor for CollectionResourceWrapper.

        Parameters:
        interval - a long.
        nodeId - a int.
        hostAddress - a String object.
        serviceName - a String object.
        repository - a RrdRepository object.
        resource - a CollectionResource object.
        attributes - a Map object.
    • Method Detail

      • setCounterReset

        public void setCounterReset​(boolean counterReset)
      • getNodeId

        public int getNodeId()

        getNodeId

        Returns:
        a int.
      • getHostAddress

        public java.lang.String getHostAddress()

        getHostAddress

        Returns:
        a String object.
      • getServiceName

        public java.lang.String getServiceName()

        getServiceName

        Returns:
        a String object.
      • getDsLabel

        public java.lang.String getDsLabel()

        getDsLabel

        Returns:
        a String object.
      • setDsLabel

        public void setDsLabel​(java.lang.String dsLabel)

        setDsLabel

        Parameters:
        dsLabel - a String object.
      • getInstance

        public java.lang.String getInstance()

        getInstance

        Returns:
        a String object.
      • getInstanceLabel

        public java.lang.String getInstanceLabel()

        getInstanceLabel

        Returns:
        a String object.
      • getResourceTypeName

        public java.lang.String getResourceTypeName()

        getResourceTypeName

        Returns:
        a String object.
      • getResourceId

        public ResourceId getResourceId()

        getResourceId

        Inspired by DefaultKscReportService

        Returns:
        a String object.
      • getIfLabel

        public java.lang.String getIfLabel()

        getIfLabel

        Returns:
        a String object.
      • getIfIndex

        public java.lang.String getIfIndex()

        getIfIndex

        Returns:
        a String object.
      • getIfInfoValue

        protected java.lang.String getIfInfoValue​(java.lang.String attribute)

        getIfInfoValue

        Parameters:
        attribute - a String object.
        Returns:
        a String object.
      • isLatencyResource

        public boolean isLatencyResource()
      • isNodeResource

        public boolean isNodeResource()

        isNodeResource

        Returns:
        a boolean.
      • isAnInterfaceResource

        public boolean isAnInterfaceResource()

        isAnInterfaceResource

        Returns:
        a boolean.
      • isValidInterfaceResource

        public boolean isValidInterfaceResource()

        isValidInterfaceResource

        Returns:
        a boolean.
      • getAttributeValue

        public java.lang.Double getAttributeValue​(java.lang.String ds)

        getAttributeValue

        Parameters:
        ds - a String object.
        Returns:
        a Double object.
      • getFieldValue

        public java.lang.String getFieldValue​(java.lang.String ds)

        getFieldValue

        Parameters:
        ds - a String object.
        Returns:
        a String object.
      • getSequenceNumber

        public java.lang.Long getSequenceNumber()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object