Package com.mysql.cj.conf
Class MemorySizeProperty
java.lang.Object
com.mysql.cj.conf.AbstractRuntimeProperty<java.lang.Integer>
com.mysql.cj.conf.IntegerProperty
com.mysql.cj.conf.MemorySizeProperty
- All Implemented Interfaces:
RuntimeProperty<java.lang.Integer>
,java.io.Serializable
public class MemorySizeProperty extends IntegerProperty
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mysql.cj.conf.RuntimeProperty
RuntimeProperty.RuntimePropertyListener
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
valueAsString
Fields inherited from class com.mysql.cj.conf.AbstractRuntimeProperty
initialValue, value, wasExplicitlySet
-
Constructor Summary
Constructors Modifier Constructor Description protected
MemorySizeProperty(PropertyDefinition<java.lang.Integer> propertyDefinition)
-
Method Summary
Modifier and Type Method Description java.lang.String
getStringValue()
Get internal value representation as String.void
initializeFrom(java.util.Properties extractFrom, ExceptionInterceptor exceptionInterceptor)
Explicitly set value of this RuntimeProperty according to the self-titled property value contained in extractFrom.void
initializeFrom(javax.naming.Reference ref, ExceptionInterceptor exceptionInterceptor)
void
resetValue()
Reset to initial value (default or defined in connection string/Properties)void
setValueInternal(java.lang.Integer value, java.lang.String valueAsString, ExceptionInterceptor exceptionInterceptor)
Internal method for setting property value; ignoring the RUNTIME_NOT_MODIFIABLE flag.Methods inherited from class com.mysql.cj.conf.AbstractRuntimeProperty
addListener, getInitialValue, getPropertyDefinition, getValue, invokeListeners, isExplicitlySet, removeListener, setValue, setValue, setValueInternal
-
Field Details
-
valueAsString
protected java.lang.String valueAsString
-
-
Constructor Details
-
Method Details
-
initializeFrom
public void initializeFrom(java.util.Properties extractFrom, ExceptionInterceptor exceptionInterceptor)Description copied from interface:RuntimeProperty
Explicitly set value of this RuntimeProperty according to the self-titled property value contained in extractFrom. This method is called during PropertySet initialization thus ignores the RUNTIME_NOT_MODIFIABLE flag.This value will also be the initial one, i.e.
RuntimeProperty.resetValue()
will reset to this value, not the default one.If extractFrom does not contain such property then this RuntimeProperty remains unchanged.
- Specified by:
initializeFrom
in interfaceRuntimeProperty<java.lang.Integer>
- Overrides:
initializeFrom
in classAbstractRuntimeProperty<java.lang.Integer>
- Parameters:
extractFrom
-Properties
object containing key-value pairs usually passed from connection string.exceptionInterceptor
- exceptionInterceptor
-
initializeFrom
- Specified by:
initializeFrom
in interfaceRuntimeProperty<java.lang.Integer>
- Overrides:
initializeFrom
in classAbstractRuntimeProperty<java.lang.Integer>
-
getStringValue
public java.lang.String getStringValue()Description copied from interface:RuntimeProperty
Get internal value representation as String.- Specified by:
getStringValue
in interfaceRuntimeProperty<java.lang.Integer>
- Overrides:
getStringValue
in classAbstractRuntimeProperty<java.lang.Integer>
- Returns:
- value
-
setValueInternal
public void setValueInternal(java.lang.Integer value, java.lang.String valueAsString, ExceptionInterceptor exceptionInterceptor)Description copied from class:AbstractRuntimeProperty
Internal method for setting property value; ignoring the RUNTIME_NOT_MODIFIABLE flag.- Overrides:
setValueInternal
in classAbstractRuntimeProperty<java.lang.Integer>
- Parameters:
value
- valuevalueAsString
- value represented by StringexceptionInterceptor
- exception interceptor
-
resetValue
public void resetValue()Description copied from interface:RuntimeProperty
Reset to initial value (default or defined in connection string/Properties)- Specified by:
resetValue
in interfaceRuntimeProperty<java.lang.Integer>
- Overrides:
resetValue
in classAbstractRuntimeProperty<java.lang.Integer>
-