Class RancidAdapterConfigManager

    • Constructor Detail

      • RancidAdapterConfigManager

        public RancidAdapterConfigManager​(InputStream reader)
                                   throws IOException

        Constructor for RancidAdapterConfigManager.

        Parameters:
        reader - a InputStream object.
        Throws:
        IOException - if any.
      • RancidAdapterConfigManager

        public RancidAdapterConfigManager()

        Constructor for RancidAdapterConfigManager.

    • Method Detail

      • getReadLock

        public Lock getReadLock()
      • getWriteLock

        public Lock getWriteLock()
      • getDelay

        public long getDelay​(String ipaddr)
        return the delay time for the specified address the delay time is the time in msec that represents a delay in the execution of a RancidAdapter execution
        Specified by:
        getDelay in interface RancidAdapterConfig
        Parameters:
        ipaddr - the ipaddress of the node
        Returns:
        the delay time
      • getRetries

        public int getRetries​(String ipaddr)
        return the number of retries in case of failure for the specified address
        Specified by:
        getRetries in interface RancidAdapterConfig
        Parameters:
        ipaddr - the ipaddress of the node
        Returns:
        the number of retries
      • useCategories

        public boolean useCategories​(String ipaddr)
        return if is to be used the opennms categories to get rancid device type
        Specified by:
        useCategories in interface RancidAdapterConfig
        Parameters:
        ipaddr - the ipaddress of the node
        Returns:
        true if use opennms category
      • getType

        public String getType​(String sysoid,
                              String sysdescr)
        return the Rancid Type String
        Specified by:
        getType in interface RancidAdapterConfig
        Parameters:
        sysoid - the system OID identifier of the node
        Returns:
        RancidType String
      • isCurTimeInSchedule

        public boolean isCurTimeInSchedule​(String ipaddr)
        Return if current time is ready to be scheduled.
        Specified by:
        isCurTimeInSchedule in interface RancidAdapterConfig
        Parameters:
        ipaddr - the ipaddress of the node
        Returns:
        true if current time is in a schedules under policy manage
      • hasSchedule

        public boolean hasSchedule​(String ipaddress)

        hasSchedule

        Parameters:
        ipaddress - a String object.
        Returns:
        a boolean.
      • getSchedules

        public List<Schedule> getSchedules​(String ipaddress)

        getSchedules

        Parameters:
        ipaddress - a String object.
        Returns:
        a List object.
      • rebuildPackageIpListMap

        public void rebuildPackageIpListMap()
        This method is used to rebuild the package against iplist mapping when needed. When a node gained service event occurs, poller has to determine which package the ip/service combination is in, but if the interface is a newly added one, the package iplist should be rebuilt so that poller could know which package this ip/service pair is in.