| Modifier | Constructor and Description |
|---|---|
|
ARPTableDTO(VId vid)
Constructs an ARP table instance, for the given VID.
|
|
ARPTableDTO(VId vid,
boolean layer2DstMacAddrOnly)
Constructs an ARP table type, for a given VID.
|
protected |
ARPTableDTO(VId vid,
long size)
Constructs an ARP table instance specified size, for a given VID.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addARPTableEntry(Entity entity)
Adds the entity to the ARP table.
|
void |
addNMAlgoListener(NMAlgoListener al)
Attaches the NMAlgoListener instance to the
ConcurrentAgingLRUHashMap.
|
Set<ARPEntry> |
arpEntries()
Returns the set of ARP translations for the VID.
|
ARPEntry |
arpEntry(IpAddress ipAddress)
Returns the ARP translation for a given IP address.
|
void |
cleanUp(long age,
ConcurrentMap<MacAddress,Set<Object>> conMap)
Cleans up the aged out entries in the aging HashMap.
|
void |
clearARPTable()
Clears learned ARP translations for the given VID.
|
void |
clearothersARPTable()
Clears learned From Others Which ARP translations for the given VID.
|
void |
deleteARPEntry(ARPEntry entry)
Deletes the given entry in the ARP table.
|
void |
deleteOtherARPEntry(ARPEntry entry)
Deletes the Others given entry in the ARP table.
|
Set<Entity> |
getEntities()
Returns a set of entity objects from the ARP table.
|
Entity |
getEntity(IpAddress ipAddress)
Returns an entity object for the given IP address.
|
Entity |
getEntity(MacAddress mac)
Returns an entity object for the given MAC address.
|
MacAddress |
getMacAddress(IpAddress ipAddress)
Returns the MAC address for the given IP address.
|
Set<NetworkNode> |
getNetworkNodes()
Returns the set of end nodes from the ARP table.
|
NetworkNode |
networkNode(IpAddress ipAddress)
Returns the end host for a given IP address.
|
NetworkNode |
networkNode(MacAddress mac)
Returns the end host for a given MAC address.
|
void |
removeNMAlgoListener(NMAlgoListener al)
Removes the NMAlgoListener instance from the
ConcurrentAgingLRUHashMap.
|
void |
replaceARPEntry(Entity oldArpEntry,
Entity newArpEntry)
Updates the entity in the ARP table.
|
int |
size()
Returns the size of the ARP table for the VID.
|
VId |
vid()
Returns the VID identifier for the ARP table.
|
public ARPTableDTO(VId vid)
Every time an entry in the ARP table is read, its last accessed time is reset to the current system time. This ensures that the active ARP entries are not removed.
vid - the VIDprotected ARPTableDTO(VId vid, long size)
If the size of the ARP table increases more than the specified size, then the least recently used entry is removed to make room for a new entry.
Every time an entry in the ARP table is read, its last accessed time is reset to the current system time. This ensures that the active ARP entries are not removed.
vid - the VID identifiersize - the size of the ARP table per VIDpublic ARPTableDTO(VId vid, boolean layer2DstMacAddrOnly)
If type is ONLYMAC, an entry write and read is according to MAC.
Every time an entry in the ARP table is read, its last accessed time is reset to the current system time. This ensures that the active ARP entries are not removed.
vid - the VID identifierlayer2DstMacAddrOnly - arp table type is according to MACpublic VId vid()
ARPTablepublic int size()
ARPTablepublic Set<ARPEntry> arpEntries()
ARPTablearpEntries in interface ARPTablepublic Entity getEntity(IpAddress ipAddress)
ipAddress - IP address for which entity needs to be retrievedNullPointerException - if IP address is null or entry is not foundpublic Entity getEntity(MacAddress mac)
mac - MAC address for which entity needs to be retrievedNullPointerException - if MAC address is null or entry is not foundpublic Set<Entity> getEntities()
public Set<NetworkNode> getNetworkNodes()
public MacAddress getMacAddress(IpAddress ipAddress)
ipAddress - IP addressNullPointerException - if the parameter is nullpublic void addARPTableEntry(Entity entity)
entity - entity to be added to the tableNullPointerException - if the parameter is nullpublic void replaceARPEntry(Entity oldArpEntry, Entity newArpEntry)
oldArpEntry - old entitynewArpEntry - new entityNullPointerException - if the parameter is nullpublic void clearARPTable()
ARPTableclearARPTable in interface ARPTablepublic void clearothersARPTable()
ARPTableclearothersARPTable in interface ARPTablepublic void deleteARPEntry(ARPEntry entry)
entry - the ARP entry to delete from the tableNullPointerException - if the parameter is nullpublic void deleteOtherARPEntry(ARPEntry entry)
entry - the ARP entry to delete from the tableNullPointerException - if the parameter is nullpublic ARPEntry arpEntry(IpAddress ipAddress)
ARPTablepublic NetworkNode networkNode(IpAddress ipAddress)
ARPTablenetworkNode in interface ARPTableipAddress - IP address of the end hostpublic NetworkNode networkNode(MacAddress mac)
ARPTablenetworkNode in interface ARPTablemac - MAC address of the end hostpublic void addNMAlgoListener(NMAlgoListener al)
al - the NMAlgoListener instancepublic void removeNMAlgoListener(NMAlgoListener al)
al - the NMAlgoListener instancepublic void cleanUp(long age,
ConcurrentMap<MacAddress,Set<Object>> conMap)
Every time an entry in the ARP table is read, its last accessed time is reset to the current system time. This ensures that the active ARP entries are not removed. The cleanUp method cleans up the ARPEntires for which the difference in time between current system time and the ARP entries last accessed time exceeds the age provided.
age - the max ageout interval (in milliseconds) for ARP entriesCopyright © 2014. All Rights Reserved.