public class InterfaceToNodeCacheDaoImpl extends AbstractInterfaceToNodeCache implements InterfaceToNodeCache
Constructor and Description |
---|
InterfaceToNodeCacheDaoImpl() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Should only be used for testing.
|
void |
dataSourceSync()
Clears and synchronizes the internal known IP address cache with the
current information contained in the database.
|
IpInterfaceDao |
getIpInterfaceDao() |
NodeDao |
getNodeDao() |
int |
getNodeId(String location,
InetAddress addr)
Returns the nodeid for the IP Address
|
int |
removeNodeId(String location,
InetAddress addr)
Removes an address from the node ID map.
|
void |
setIpInterfaceDao(IpInterfaceDao ipInterfaceDao) |
void |
setNodeDao(NodeDao nodeDao) |
int |
setNodeId(String location,
InetAddress addr,
int nodeid)
Sets the IP Address and Node ID in the Map.
|
int |
size() |
getInstance, setInstance
public NodeDao getNodeDao()
public void setNodeDao(NodeDao nodeDao)
public IpInterfaceDao getIpInterfaceDao()
public void setIpInterfaceDao(IpInterfaceDao ipInterfaceDao)
@Transactional public void dataSourceSync()
dataSourceSync
in interface InterfaceToNodeCache
SQLException
- Thrown if the connection cannot be created or a database
error occurs.public int getNodeId(String location, InetAddress addr)
getNodeId
in interface InterfaceToNodeCache
addr
- The IP Address to query.@Transactional public int setNodeId(String location, InetAddress addr, int nodeid)
setNodeId
in interface InterfaceToNodeCache
addr
- The IP Address to add.nodeid
- The Node ID to add.public int removeNodeId(String location, InetAddress addr)
removeNodeId
in interface InterfaceToNodeCache
addr
- The address to remove from the node ID map.public int size()
size
in interface InterfaceToNodeCache
public void clear()
InterfaceToNodeCache
clear
in interface InterfaceToNodeCache
Copyright © 2017. All rights reserved.