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 persistent store
(see SystemOptionManager.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
Modifier and TypeClassDescriptionstatic enum
Defines where an option can be configured.static enum
static enum
This defines where an option was actually configured. -
Field Summary
Modifier and TypeFieldDescriptionfinal Boolean
final Double
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
final OptionValue.Kind
final String
final Long
final OptionValue.OptionScope
final String
-
Method Summary
Modifier and TypeMethodDescriptionint
static OptionValue
create
(OptionValue.AccessibleScopes accessibleScopes, String name, boolean bool, OptionValue.OptionScope scope) static OptionValue
create
(OptionValue.AccessibleScopes accessibleScopes, String name, double val, OptionValue.OptionScope scope) static OptionValue
create
(OptionValue.AccessibleScopes accessibleScopes, String name, long val, OptionValue.OptionScope scope) static OptionValue
create
(OptionValue.AccessibleScopes type, String name, Object val, OptionValue.OptionScope scope, OptionValue.Kind kind) static OptionValue
create
(OptionValue.AccessibleScopes accessibleScopes, String name, String val, OptionValue.OptionScope scope) static OptionValue
create
(OptionValue.Kind kind, OptionValue.AccessibleScopes accessibleScopes, String name, String val, OptionValue.OptionScope scope) boolean
boolean
equalsIgnoreType
(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.int
hashCode()
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:
compareTo
in interfaceComparable<OptionValue>
-
toString
-