inet.ipaddr

Class IPAddressNetwork.HostNameGenerator

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    IPAddressNetwork<T extends IPAddress,R extends IPAddressSection,E extends IPAddressSection,S extends IPAddressSegment,J extends java.net.InetAddress>


    public static class IPAddressNetwork.HostNameGenerator
    extends AddressNetwork.HostIdentifierStringGenerator<HostName>
    Choose a map of your choice to implement a cache of host names and resolved addresses. The map will map string representations of the host to HostName objects. Those HostName objects in turn cache any resulting IPAddressString objects if the string represents an address, or any IPAddress objects obtained from resolving the HostName. Those objects are all themselves thread-safe, but the cache will only be thread-safe if you choose a thread-safe map such as ConcurrentHashMap.
    See Also:
    Serialized Form