public class JdbcTrapdIpMgr extends Object implements TrapdIpMgr, org.springframework.beans.factory.InitializingBean
Modifier and Type | Field and Description |
---|---|
protected Map<String,Long> |
m_knownips
A Map of IP addresses and node IDs
|
Constructor and Description |
---|
JdbcTrapdIpMgr()
Default construct for the instance.
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
afterPropertiesSet
|
void |
dataSourceSync()
dataSourceSync
|
DataSource |
getDataSource()
getDataSource
|
long |
getNodeId(String addr)
Returns the nodeid for the IP Address
|
long |
removeNodeId(String addr)
Removes an address from the node ID map.
|
void |
setDataSource(DataSource dataSource)
setDataSource
|
long |
setNodeId(String addr,
long nodeid)
Sets the IP Address and Node ID in the Map.
|
public void dataSourceSync()
dataSourceSync
dataSourceSync
in interface TrapdIpMgr
public long getNodeId(String addr)
getNodeId
in interface TrapdIpMgr
addr
- The IP Address to query.public long setNodeId(String addr, long nodeid)
setNodeId
in interface TrapdIpMgr
addr
- The IP Address to add.nodeid
- The Node ID to add.public long removeNodeId(String addr)
removeNodeId
in interface TrapdIpMgr
addr
- The address to remove from the node ID map.public DataSource getDataSource()
getDataSource
DataSource
object.public void setDataSource(DataSource dataSource)
setDataSource
dataSource
- a DataSource
object.Copyright © 2015. All rights reserved.