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, setInstancepublic NodeDao getNodeDao()
public void setNodeDao(NodeDao nodeDao)
public IpInterfaceDao getIpInterfaceDao()
public void setIpInterfaceDao(IpInterfaceDao ipInterfaceDao)
@Transactional public void dataSourceSync()
dataSourceSync in interface InterfaceToNodeCacheSQLException - Thrown if the connection cannot be created or a database
error occurs.public int getNodeId(String location, InetAddress addr)
getNodeId in interface InterfaceToNodeCacheaddr - The IP Address to query.@Transactional public int setNodeId(String location, InetAddress addr, int nodeid)
setNodeId in interface InterfaceToNodeCacheaddr - The IP Address to add.nodeid - The Node ID to add.public int removeNodeId(String location, InetAddress addr)
removeNodeId in interface InterfaceToNodeCacheaddr - The address to remove from the node ID map.public int size()
size in interface InterfaceToNodeCachepublic void clear()
InterfaceToNodeCacheclear in interface InterfaceToNodeCacheCopyright © 2017. All rights reserved.