Top Fields Constructors Methods
com.mysql.cj.conf

public abstract Class AbstractRuntimeProperty<T>

extends Object
implements RuntimeProperty<T>, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, com.mysql.cj.conf.RuntimeProperty
Known Direct Subclasses
com.mysql.cj.conf.BooleanProperty, com.mysql.cj.conf.EnumProperty, com.mysql.cj.conf.IntegerProperty, com.mysql.cj.conf.LongProperty, com.mysql.cj.conf.StringProperty
Imports
java.io.Serializable, java.lang.ref.WeakReference, java.util.ArrayList, .List, .Properties, javax.naming.RefAddr, .Reference, com.mysql.cj.Messages, com.mysql.cj.exceptions.ExceptionFactory, .ExceptionInterceptor, .PropertyNotModifiableException

Field Summary

Modifier and TypeField and Description
protected T
private List<WeakReference<RuntimeProperty.RuntimePropertyListener>>
private PropertyDefinition<T>
private static final long
protected T
protected boolean

Constructor Summary

AccessConstructor and Description
public
protected

Method Summary

Modifier and TypeMethod and Description
public void
protected void
checkRange(T
value
val
,
String
value represented by String
valueAsString
,
ExceptionInterceptor
exception interceptor
exceptionInterceptor
)

For range-based property, checks that value fit into range given by PropertyDefinition.

public T
getInitialValue()

Implements com.mysql.cj.conf.RuntimeProperty.getInitialValue.

Get initial value (default or defined in connection string/Properties)

public PropertyDefinition<T>
public String
getStringValue()

Implements com.mysql.cj.conf.RuntimeProperty.getStringValue.

Get internal value representation as String.

public T
getValue()

Implements com.mysql.cj.conf.RuntimeProperty.getValue.

Get internal value representation as Object.

public void
initializeFrom(Properties
Properties object containing key-value pairs usually passed from connection string.
extractFrom
,
ExceptionInterceptor
exceptionInterceptor
exceptionInterceptor
)

Implements com.mysql.cj.conf.RuntimeProperty.initializeFrom.

Explicitly set value of this RuntimeProperty according to the self-titled property value contained in extractFrom.

public void
protected void
public boolean
public void
public void
resetValue()

Implements com.mysql.cj.conf.RuntimeProperty.resetValue.

Reset to initial value (default or defined in connection string/Properties)

public void
setValue(T
value
value
)

Implements com.mysql.cj.conf.RuntimeProperty.setValue.

Set the object value of a property directly.

public void
setValue(T
value
value
,
ExceptionInterceptor
exception interceptor
exceptionInterceptor
)

Implements com.mysql.cj.conf.RuntimeProperty.setValue.

Set the object value of a property directly.

public void
setValueInternal(String
value
value
,
ExceptionInterceptor
exception interceptor
exceptionInterceptor
)

Set the value of a property from a string value.

public void
setValueInternal(T
value
value
,
String
value represented by String
valueAsString
,
ExceptionInterceptor
exception interceptor
exceptionInterceptor
)

Internal method for setting property value; ignoring the RUNTIME_NOT_MODIFIABLE flag.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

initialValueback to summary
protected T initialValue
listenersback to summary
private List<WeakReference<RuntimeProperty.RuntimePropertyListener>> listeners
propertyDefinitionback to summary
private PropertyDefinition<T> propertyDefinition
serialVersionUIDback to summary
private static final long serialVersionUID
valueback to summary
protected T value
wasExplicitlySetback to summary
protected boolean wasExplicitlySet

Constructor Detail

AbstractRuntimePropertyback to summary
public AbstractRuntimeProperty()
AbstractRuntimePropertyback to summary
protected AbstractRuntimeProperty(PropertyDefinition<T> propertyDefinition)

Method Detail

addListenerback to summary
public void addListener(RuntimeProperty.RuntimePropertyListener l)

Implements com.mysql.cj.conf.RuntimeProperty.addListener.

Doc from com.mysql.cj.conf.RuntimeProperty.addListener.

Add listener for this property changes.

Parameters
l:RuntimeProperty.RuntimePropertyListener

RuntimePropertyListener

Annotations
@Override
checkRangeback to summary
protected void checkRange(T val, String valueAsString, ExceptionInterceptor exceptionInterceptor)

For range-based property, checks that value fit into range given by PropertyDefinition.

Parameters
val:T

value

valueAsString:String

value represented by String

exceptionInterceptor:ExceptionInterceptor

exception interceptor

getInitialValueback to summary
public T getInitialValue()

Implements com.mysql.cj.conf.RuntimeProperty.getInitialValue.

Doc from com.mysql.cj.conf.RuntimeProperty.getInitialValue.

Get initial value (default or defined in connection string/Properties)

Returns:T

value

Annotations
@Override
getPropertyDefinitionback to summary
public PropertyDefinition<T> getPropertyDefinition()

Implements com.mysql.cj.conf.RuntimeProperty.getPropertyDefinition.

Annotations
@Override
getStringValueback to summary
public String getStringValue()

Implements com.mysql.cj.conf.RuntimeProperty.getStringValue.

Doc from com.mysql.cj.conf.RuntimeProperty.getStringValue.

Get internal value representation as String.

Returns:String

value

Annotations
@Override
getValueback to summary
public T getValue()

Implements com.mysql.cj.conf.RuntimeProperty.getValue.

Doc from com.mysql.cj.conf.RuntimeProperty.getValue.

Get internal value representation as Object.

Returns:T

value

Annotations
@Override
initializeFromback to summary
public void initializeFrom(Properties extractFrom, ExceptionInterceptor exceptionInterceptor)

Implements com.mysql.cj.conf.RuntimeProperty.initializeFrom.

Doc from com.mysql.cj.conf.RuntimeProperty.initializeFrom.

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. resetValue() will reset to this value, not the default one.

If extractFrom does not contain such property then this RuntimeProperty remains unchanged.

Parameters
extractFrom:Properties

Properties object containing key-value pairs usually passed from connection string.

exceptionInterceptor:ExceptionInterceptor

exceptionInterceptor

Annotations
@Override
initializeFromback to summary
public void initializeFrom(Reference ref, ExceptionInterceptor exceptionInterceptor)

Implements com.mysql.cj.conf.RuntimeProperty.initializeFrom.

Annotations
@Override
invokeListenersback to summary
protected void invokeListeners()
isExplicitlySetback to summary
public boolean isExplicitlySet()

Implements com.mysql.cj.conf.RuntimeProperty.isExplicitlySet.

Annotations
@Override
removeListenerback to summary
public void removeListener(RuntimeProperty.RuntimePropertyListener listener)

Implements com.mysql.cj.conf.RuntimeProperty.removeListener.

Annotations
@Override
resetValueback to summary
public void resetValue()

Implements com.mysql.cj.conf.RuntimeProperty.resetValue.

Doc from com.mysql.cj.conf.RuntimeProperty.resetValue.

Reset to initial value (default or defined in connection string/Properties)

Annotations
@Override
setValueback to summary
public void setValue(T value)

Implements com.mysql.cj.conf.RuntimeProperty.setValue.

Doc from com.mysql.cj.conf.RuntimeProperty.setValue.

Set the object value of a property directly. Validation against allowable values will be performed.

Parameters
value:T

value

Annotations
@Override
setValueback to summary
public void setValue(T value, ExceptionInterceptor exceptionInterceptor)

Implements com.mysql.cj.conf.RuntimeProperty.setValue.

Doc from com.mysql.cj.conf.RuntimeProperty.setValue.

Set the object value of a property directly. Validation against allowable values will be performed.

Parameters
value:T

value

exceptionInterceptor:ExceptionInterceptor

exception interceptor

Annotations
@Override
setValueInternalback to summary
public void setValueInternal(String value, ExceptionInterceptor exceptionInterceptor)

Set the value of a property from a string value. It involves the PropertyDefinition#parseObject(String, ExceptionInterceptor) to validate and parse the string.

Parameters
value:String

value

exceptionInterceptor:ExceptionInterceptor

exception interceptor

setValueInternalback to summary
public void setValueInternal(T value, String valueAsString, ExceptionInterceptor exceptionInterceptor)

Internal method for setting property value; ignoring the RUNTIME_NOT_MODIFIABLE flag.

Parameters
value:T

value

valueAsString:String

value represented by String

exceptionInterceptor:ExceptionInterceptor

exception interceptor