org.opennms.netmgt.trapd
Interface TrapdIpMgr

All Known Implementing Classes:
HibernateTrapdIpMgr, JdbcTrapdIpMgr

public interface TrapdIpMgr


Method Summary
 void clearKnownIpsMap()
           
 void dataSourceSync()
          Clears and synchronizes the internal known IP address cache with the current information contained in the database.
 long getNodeId(String addr)
          Returns the nodeid for the IP Address
 long removeNodeId(String addr)
          Removes an address from the node ID map.
 long setNodeId(String addr, long nodeid)
          Sets the IP Address and Node ID in the Map.
 

Method Detail

dataSourceSync

void dataSourceSync()
                    throws SQLException
Clears and synchronizes the internal known IP address cache with the current information contained in the database. To synchronize the cache the method opens a new connection to the database, loads the address, and then closes it's connection.

Throws:
SQLException - Thrown if the connection cannot be created or a database error occurs.

getNodeId

long getNodeId(String addr)
Returns the nodeid for the IP Address

Parameters:
addr - The IP Address to query.
Returns:
The node ID of the IP Address if known.

setNodeId

long setNodeId(String addr,
               long nodeid)
Sets the IP Address and Node ID in the Map.

Parameters:
addr - The IP Address to add.
nodeid - The Node ID to add.
Returns:
The nodeid if it existed in the map.

removeNodeId

long removeNodeId(String addr)
Removes an address from the node ID map.

Parameters:
addr - The address to remove from the node ID map.
Returns:
The nodeid that was in the map.

clearKnownIpsMap

void clearKnownIpsMap()


Copyright © 2009. All Rights Reserved.