Enum SegmentMetadataCache.UsageMode

java.lang.Object
java.lang.Enum<SegmentMetadataCache.UsageMode>
org.apache.druid.metadata.segment.cache.SegmentMetadataCache.UsageMode
All Implemented Interfaces:
Serializable, Comparable<SegmentMetadataCache.UsageMode>
Enclosing interface:
SegmentMetadataCache

public static enum SegmentMetadataCache.UsageMode extends Enum<SegmentMetadataCache.UsageMode>
Cache usage modes.
  • Enum Constant Details

    • ALWAYS

      public static final SegmentMetadataCache.UsageMode ALWAYS
      Always read from the cache. Service start-up may be blocked until cache has synced with the metadata store at least once. Transactions may block until cache has synced with the metadata store at least once after becoming leader.
    • NEVER

      public static final SegmentMetadataCache.UsageMode NEVER
      Cache is disabled.
    • IF_SYNCED

      public static final SegmentMetadataCache.UsageMode IF_SYNCED
      Read from the cache only if it is already synced with the metadata store. Does not block service start-up or transactions. Writes may still go to cache to reduce sync times.
  • Method Details

    • values

      public static SegmentMetadataCache.UsageMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static SegmentMetadataCache.UsageMode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • fromString

      public static SegmentMetadataCache.UsageMode fromString(String value)
    • toString

      public String toString()
      Overrides:
      toString in class Enum<SegmentMetadataCache.UsageMode>