Class IndexStorageStrategy

    • Constructor Detail

      • IndexStorageStrategy

        public IndexStorageStrategy()
    • Method Detail

      • getRelativePathForAttribute

        public final ResourcePath getRelativePathForAttribute​(ResourcePath resourceParent,
                                                              java.lang.String instance)

        getRelativePathForAttribute

        Specified by:
        getRelativePathForAttribute in interface StorageStrategy
        Parameters:
        resourceParent - a String object.
        instance - a String object.
        Returns:
        a Path object.
      • setResourceTypeName

        public final void setResourceTypeName​(java.lang.String name)

        setResourceTypeName

        Specified by:
        setResourceTypeName in interface StorageStrategy
        Parameters:
        name - a String object.
      • getResourceTypeName

        public final java.lang.String getResourceTypeName()

        getResourceTypeName

        Returns:
        a String object.
      • getResourceNameFromIndex

        public java.lang.String getResourceNameFromIndex​(CollectionResource resource)
        This functions translate resourceIndex into a "unique" and "non-variable" name that could be identify a resource, as described earlier. This method could be expensive because it could require send SNMP queries and make complicated functions to build the name. So you must try to call it only when is necessary.
        Specified by:
        getResourceNameFromIndex in interface StorageStrategy
        Parameters:
        resource - a CollectionResource object
        Returns:
        a String object.
      • setStorageStrategyService

        public final void setStorageStrategyService​(StorageStrategyService agent)
        Add to a strategy the possibility to get additional information using SNMP when is necessary. There are complex tables on some MIBs where indexes depends on indexes from other tables (indirect indexing). For this kind of resources we must send some additional SNMP queries to build a unique name.
        Specified by:
        setStorageStrategyService in interface StorageStrategy
        Parameters:
        agent - a org.opennms.netmgt.config.StorageStrategyService object.
      • setParameters

        public void setParameters​(java.util.List<Parameter> parameterCollection)
                           throws java.lang.IllegalArgumentException

        setParameters

        Specified by:
        setParameters in interface StorageStrategy
        Parameters:
        parameterCollection - a List object.
        Throws:
        java.lang.IllegalArgumentException