DnsCnameCache.
| Modifier and Type | Field and Description |
|---|---|
| private final Cache | |
| private final int | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | cache(String
the hostname hostname, String the cname mapping. cname, long the TTL as returned by the DNS server originalTtl, EventLoop the loop)EventLoop used to register the TTL timeoutImplements io. |
| public void | |
| public boolean | clear(String hostname)
Implements io. |
| public String | get(String
the hostname hostname)Implements io. |
| cache | back to summary |
|---|---|
| private final Cache<String> cache | |
| maxTtl | back to summary |
|---|---|
| private final int maxTtl | |
| minTtl | back to summary |
|---|---|
| private final int minTtl | |
| DefaultDnsCnameCache | back to summary |
|---|---|
| public DefaultDnsCnameCache() Create a cache that respects the TTL returned by the DNS server. | |
| DefaultDnsCnameCache | back to summary |
|---|---|
| public DefaultDnsCnameCache(int minTtl, int maxTtl) Create a cache.
| |
| cache | back to summary |
|---|---|
| public void cache(String hostname, String cname, long originalTtl, EventLoop loop) Implements io. Doc from io. Caches a cname entry that should be used for the given hostname. | |
| clear | back to summary |
|---|---|
| public void clear() Implements io. Doc from io. Clears all cached nameservers.
| |
| clear | back to summary |
|---|---|
| public boolean clear(String hostname) Implements io. Doc from io. Clears the cached nameservers for the specified hostname.
| |
| get | back to summary |
|---|---|
| public String get(String hostname) Implements io. Doc from io. Returns the cached cname for the given hostname.
| |