org.opennms.netmgt.capsd
Class RescanProcessor

java.lang.Object
  extended by org.opennms.netmgt.capsd.RescanProcessor
All Implemented Interfaces:
Runnable

public final class RescanProcessor
extends Object
implements Runnable

This class is designed to rescan all the managed interfaces for a specified node, update the database based on the information collected, and generate events necessary to notify the other OpenNMS services. The constructor takes an integer which is the node identifier of the node to be rescanned. .

Author:
James Zuo , Mike Davidson , Brian Weaver , OpenNMS

Constructor Summary
RescanProcessor(int nodeId, boolean forceRescan, CapsdDbSyncer capsdDbSyncer, PluginManager pluginManager)
          Constructor for RescanProcessor.
 
Method Summary
static boolean isRescanQueuedForNode(Integer nodeId)
          Is a rescan already enqueued for a given node ID?
 void run()
          This is where all the work of the class is done.
protected static boolean scannableInterface(DbIpInterfaceEntry[] dbInterfaces, InetAddress ifaddr)
          scannableInterface
static void setQueuedRescansTracker(Set<Integer> queuedRescanTracker)
          Responsible for setting the Set used to track rescans that are already enqueued for processing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RescanProcessor

public RescanProcessor(int nodeId,
                       boolean forceRescan,
                       CapsdDbSyncer capsdDbSyncer,
                       PluginManager pluginManager)

Constructor for RescanProcessor.

Parameters:
nodeId - a int.
forceRescan - a boolean.
capsdDbSyncer - a CapsdDbSyncer object.
pluginManager - a PluginManager object.
Method Detail

run

public void run()
This is where all the work of the class is done.

Specified by:
run in interface Runnable

scannableInterface

protected static boolean scannableInterface(DbIpInterfaceEntry[] dbInterfaces,
                                            InetAddress ifaddr)

scannableInterface

Parameters:
dbInterfaces - an array of DbIpInterfaceEntry objects.
ifaddr - a InetAddress object.
Returns:
a boolean.

setQueuedRescansTracker

public static void setQueuedRescansTracker(Set<Integer> queuedRescanTracker)
Responsible for setting the Set used to track rescans that are already enqueued for processing. Should be called once by Capsd at startup.

Parameters:
queuedRescanTracker - The synchronized Set to use

isRescanQueuedForNode

public static boolean isRescanQueuedForNode(Integer nodeId)
Is a rescan already enqueued for a given node ID?

Parameters:
nodeId - a Integer object.
Returns:
a boolean.


Copyright © 2011. All Rights Reserved.