Interface DnsCacheListener

All Known Implementing Classes:
DnsAddressEndpointGroup, DnsServiceEndpointGroup, DnsTextEndpointGroup

@UnstableApi public interface DnsCacheListener
Listens to the DnsCache events.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onEviction(io.netty.handler.codec.dns.DnsQuestion question, @Nullable List<io.netty.handler.codec.dns.DnsRecord> records, @Nullable UnknownHostException cause)
    Invoked when an eviction occurred for the DnsRecords.
    void
    onRemoval(io.netty.handler.codec.dns.DnsQuestion question, @Nullable List<io.netty.handler.codec.dns.DnsRecord> records, @Nullable UnknownHostException cause)
    Invoked when the DnsRecords expired due to TTL or negative TTL.
  • Method Details

    • onRemoval

      void onRemoval(io.netty.handler.codec.dns.DnsQuestion question, @Nullable @Nullable List<io.netty.handler.codec.dns.DnsRecord> records, @Nullable @Nullable UnknownHostException cause)
      Invoked when the DnsRecords expired due to TTL or negative TTL.
      Parameters:
      question - the DNS question.
      records - the result of a successful DNS resolution. null if failed.
      cause - the cause of a failed DNS resolution. null if succeeded.
    • onEviction

      void onEviction(io.netty.handler.codec.dns.DnsQuestion question, @Nullable @Nullable List<io.netty.handler.codec.dns.DnsRecord> records, @Nullable @Nullable UnknownHostException cause)
      Invoked when an eviction occurred for the DnsRecords. The eviction occurs due to exceeding the maximum size.
      Parameters:
      question - the DNS question.
      records - the result of a successful DNS resolution. null if failed.
      cause - the cause of a failed DNS resolution. null if succeeded.