public class InterfaceToNodeCacheDaoImpl extends AbstractInterfaceToNodeCache implements InterfaceToNodeCache
| Constructor and Description | 
|---|
InterfaceToNodeCacheDaoImpl()  | 
InterfaceToNodeCacheDaoImpl(long refreshRate)  | 
| 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()  | 
Iterable<Integer> | 
getNodeId(String location,
         InetAddress address)
Returns the nodeid for the IP Address 
 | 
void | 
init()  | 
void | 
removeInterfacesForNode(int nodeId)  | 
boolean | 
removeNodeId(String location,
            InetAddress address,
            int nodeId)
Removes an address from the node ID map. 
 | 
void | 
setIpInterfaceDao(IpInterfaceDao ipInterfaceDao)  | 
void | 
setNodeDao(NodeDao nodeDao)  | 
boolean | 
setNodeId(String location,
         InetAddress addr,
         int nodeid)
Sets the IP Address and Node ID in the Map. 
 | 
int | 
size()  | 
getFirstNodeId, getInstance, setInstanceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFirstNodeIdpublic InterfaceToNodeCacheDaoImpl()
public InterfaceToNodeCacheDaoImpl(long refreshRate)
@PostConstruct public void init()
public 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 Iterable<Integer> getNodeId(String location, InetAddress address)
If multiple nodes hav assigned interfaces with the same IP, this returns all known nodes sorted by the interface management priority.
getNodeId in interface InterfaceToNodeCacheaddress - The IP Address to query.@Transactional public boolean setNodeId(String location, InetAddress addr, int nodeid)
setNodeId in interface InterfaceToNodeCacheaddr - The IP Address to add.nodeid - The Node ID to add.public boolean removeNodeId(String location, InetAddress address, int nodeId)
removeNodeId in interface InterfaceToNodeCacheaddress - The address to remove from the node ID map.public int size()
size in interface InterfaceToNodeCachepublic void clear()
InterfaceToNodeCacheclear in interface InterfaceToNodeCachepublic void removeInterfacesForNode(int nodeId)
removeInterfacesForNode in interface InterfaceToNodeCacheCopyright © 2021. All rights reserved.