Class OptionValue
- All Implemented Interfaces:
Comparable<OptionValue>
An option value is used internally by an
OptionManager to store a run-time setting. This setting, for example,
could affect a query in an execution stage. Instances of this class are JSON
serializable and can be stored in a
invalid reference
persistent storeSystemOptionManager.options), or in memory (see
InMemoryOptionManager.options).
OptionValue.AccessibleScopes defines the scopes at which the option can be set.
If it can be set at System level or Session level or so on. Whereas
OptionValue.OptionScope defines the scope at which the option is being set. If
the option is being set at the BOOT time the scope of the option is BOOT. If
it is set at SYSTEM level the scope is SYSTEM. Although they look similar
there is a fine level which differentiates both of them which is at which
level of hierarchy they can be set and at what at level of hierarchy they
were actually set.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines where an option can be configured.static enumstatic enumThis defines where an option was actually configured. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Booleanfinal Doublestatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringfinal OptionValue.Kindfinal Stringfinal Longfinal OptionValue.OptionScopefinal String -
Method Summary
Modifier and TypeMethodDescriptionintstatic OptionValuecreate(OptionValue.AccessibleScopes accessibleScopes, String name, boolean bool, OptionValue.OptionScope scope) static OptionValuecreate(OptionValue.AccessibleScopes accessibleScopes, String name, double val, OptionValue.OptionScope scope) static OptionValuecreate(OptionValue.AccessibleScopes accessibleScopes, String name, long val, OptionValue.OptionScope scope) static OptionValuecreate(OptionValue.AccessibleScopes type, String name, Object val, OptionValue.OptionScope scope, OptionValue.Kind kind) static OptionValuecreate(OptionValue.AccessibleScopes accessibleScopes, String name, String val, OptionValue.OptionScope scope) static OptionValuecreate(OptionValue.Kind kind, OptionValue.AccessibleScopes accessibleScopes, String name, String val, OptionValue.OptionScope scope) booleanbooleanequalsIgnoreType(Object obj) getName()getScope()getValue()getValueMinScope(OptionValue.OptionScope minScope) Gets the value of this option if it exists at a scope at least as narrow as the given scope.inthashCode()toString()
-
Field Details
-
JSON_KIND
- See Also:
-
JSON_ACCESSIBLE_SCOPES
- See Also:
-
JSON_NAME
- See Also:
-
JSON_NUM_VAL
- See Also:
-
JSON_STRING_VAL
- See Also:
-
JSON_BOOL_VAL
- See Also:
-
JSON_FLOAT_VAL
- See Also:
-
JSON_INTEGER_VAL
- See Also:
-
JSON_SCOPE
- See Also:
-
name
-
kind
-
accessibleScopes
-
num_val
-
string_val
-
bool_val
-
float_val
-
scope
-
-
Method Details
-
create
public static OptionValue create(OptionValue.AccessibleScopes accessibleScopes, String name, long val, OptionValue.OptionScope scope) -
create
public static OptionValue create(OptionValue.AccessibleScopes accessibleScopes, String name, boolean bool, OptionValue.OptionScope scope) -
create
public static OptionValue create(OptionValue.AccessibleScopes accessibleScopes, String name, String val, OptionValue.OptionScope scope) -
create
public static OptionValue create(OptionValue.AccessibleScopes accessibleScopes, String name, double val, OptionValue.OptionScope scope) -
create
public static OptionValue create(OptionValue.Kind kind, OptionValue.AccessibleScopes accessibleScopes, String name, String val, OptionValue.OptionScope scope) -
create
public static OptionValue create(OptionValue.AccessibleScopes type, String name, Object val, OptionValue.OptionScope scope, OptionValue.Kind kind) -
getName
-
getValue
-
getValueMinScope
Gets the value of this option if it exists at a scope at least as narrow as the given scope.- Parameters:
minScope- scope which the option's scope should be narrower than- Returns:
- null if the option does not exist at a scope at least as narrow as minScope
-
getScope
-
toPersisted
-
hashCode
public int hashCode() -
equalsIgnoreType
-
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<OptionValue>
-
toString
-