Class NodeLevelResource

    • Constructor Detail

      • NodeLevelResource

        public NodeLevelResource​(int nodeId)
      • NodeLevelResource

        public NodeLevelResource​(int nodeId,
                                 java.lang.String path)
        Deprecated.
        use a GenericTypeResource instead
        Allows node level resources to live in a sub-directory of the node directory when the path is set to a non-null value. This is generally not recommend, and these cases should be modeled using GenericTypeResources instead, however it exists for backwards compatibility with the JMX collector.
        Parameters:
        nodeId - the node id
        path - sub-directory of the node directory
    • Method Detail

      • getNodeId

        public int getNodeId()
      • getPath

        public java.lang.String getPath()
      • getParent

        public Resource getParent()
      • getInstance

        public java.lang.String getInstance()
        Description copied from interface: Resource
        Returns a unique name for the instance of this resource. Used by the IndexStorageStrategy
        Returns:
        instance name
      • getUnmodifiedInstance

        public java.lang.String getUnmodifiedInstance()
        Description copied from interface: Resource
        Returns the original unmodified unique name for the instance of this resource. Used by the ObjectNameStorageStrategy
        Returns:
        instance name
      • getPath

        public ResourcePath getPath​(CollectionResource resource)
        Description copied from interface: Resource
        Retrieves the path of the resource, relative to the repository root.
        Parameters:
        resource - Used by the GenericTypeResource in order to determine the instance name.
        Returns:
        relative path
      • getLabel

        public java.lang.String getLabel​(CollectionResource resource)
        Description copied from interface: Resource
        Returns a unique label for the instance of this resource. This label is used by threshd to generate a unique id on a per resource basis, grouped by node. See CollectionResourceWrapper
        Returns:
        a String object.
      • getTypeName

        public java.lang.String getTypeName()
        Description copied from interface: Resource
        Returns the type name associated with the resource. Used for thresholding.
        Returns:
        type name
      • toString

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

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object