Share via


LocalDnsServeStale Class

public final class LocalDnsServeStale
extends ExpandableStringEnum<LocalDnsServeStale>

Policy for serving stale data. See [cache plugin](https://coredns.io/plugins/cache) for more information.

Field Summary

Modifier and Type Field and Description
static final LocalDnsServeStale DISABLE

Disable serving stale data.

static final LocalDnsServeStale IMMEDIATE

Serve stale data immediately.

static final LocalDnsServeStale VERIFY

Serve stale data with verification.

Constructor Summary

Constructor Description
LocalDnsServeStale()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of LocalDnsServeStale value.

Method Summary

Modifier and Type Method and Description
static LocalDnsServeStale fromString(String name)

Creates or finds a LocalDnsServeStale from its string representation.

static Collection<LocalDnsServeStale> values()

Gets known LocalDnsServeStale values.

Methods inherited from ExpandableStringEnum

Methods inherited from java.lang.Object

Field Details

DISABLE

public static final LocalDnsServeStale DISABLE

Disable serving stale data.

IMMEDIATE

public static final LocalDnsServeStale IMMEDIATE

Serve stale data immediately. Send the expired entry to the client before checking to see if the entry is available from the source. See [cache plugin](https://coredns.io/plugins/cache) for more information.

VERIFY

public static final LocalDnsServeStale VERIFY

Serve stale data with verification. First verify that an entry is still unavailable from the source before sending the expired entry to the client. See [cache plugin](https://coredns.io/plugins/cache) for more information.

Constructor Details

LocalDnsServeStale

@Deprecated
public LocalDnsServeStale()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of LocalDnsServeStale value.

Method Details

fromString

public static LocalDnsServeStale fromString(String name)

Creates or finds a LocalDnsServeStale from its string representation.

Parameters:

name - a name to look for.

Returns:

the corresponding LocalDnsServeStale.

values

public static Collection<LocalDnsServeStale> values()

Gets known LocalDnsServeStale values.

Returns:

known LocalDnsServeStale values.

Applies to