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
Cache usage modes.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionfromString(String value) toString()Returns the enum constant of this type with the specified name.static SegmentMetadataCache.UsageMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
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
Cache is disabled. -
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
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
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 nameNullPointerException- if the argument is null
-
fromString
-
toString
- Overrides:
toStringin classEnum<SegmentMetadataCache.UsageMode>
-