类 AbstractRuntimeProperty<T>
- java.lang.Object
-
- com.mysql.cj.conf.AbstractRuntimeProperty<T>
-
- 所有已实现的接口:
RuntimeProperty<T>,Serializable
public abstract class AbstractRuntimeProperty<T> extends Object implements RuntimeProperty<T>, Serializable
- 另请参阅:
- 序列化表格
-
-
嵌套类概要
-
从接口继承的嵌套类/接口 com.mysql.cj.conf.RuntimeProperty
RuntimeProperty.RuntimePropertyListener
-
-
字段概要
字段 修饰符和类型 字段 说明 protected TinitialValueprotected Tvalueprotected booleanwasExplicitlySet
-
构造器概要
构造器 限定符 构造器 说明 AbstractRuntimeProperty()protectedAbstractRuntimeProperty(PropertyDefinition<T> propertyDefinition)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddListener(RuntimeProperty.RuntimePropertyListener l)Add listener for this property changes.protected voidcheckRange(T val, String valueAsString, ExceptionInterceptor exceptionInterceptor)For range-based property, checks that value fit into range given by PropertyDefinition.TgetInitialValue()Get initial value (default or defined in connection string/Properties)PropertyDefinition<T>getPropertyDefinition()StringgetStringValue()Get internal value representation as String.TgetValue()Get internal value representation as Object.voidinitializeFrom(Properties extractFrom, ExceptionInterceptor exceptionInterceptor)Explicitly set value of this RuntimeProperty according to the self-titled property value contained in extractFrom.voidinitializeFrom(Reference ref, ExceptionInterceptor exceptionInterceptor)protected voidinvokeListeners()booleanisExplicitlySet()voidremoveListener(RuntimeProperty.RuntimePropertyListener listener)voidresetValue()Reset to initial value (default or defined in connection string/Properties)voidsetValue(T value)Set the object value of a property directly.voidsetValue(T value, ExceptionInterceptor exceptionInterceptor)Set the object value of a property directly.voidsetValueInternal(String value, ExceptionInterceptor exceptionInterceptor)Set the value of a property from a string value.voidsetValueInternal(T value, String valueAsString, ExceptionInterceptor exceptionInterceptor)Internal method for setting property value; ignoring the RUNTIME_NOT_MODIFIABLE flag.
-
-
-
构造器详细资料
-
AbstractRuntimeProperty
public AbstractRuntimeProperty()
-
AbstractRuntimeProperty
protected AbstractRuntimeProperty(PropertyDefinition<T> propertyDefinition)
-
-
方法详细资料
-
getPropertyDefinition
public PropertyDefinition<T> getPropertyDefinition()
- 指定者:
getPropertyDefinition在接口中RuntimeProperty<T>
-
initializeFrom
public void initializeFrom(Properties extractFrom, ExceptionInterceptor exceptionInterceptor)
从接口复制的说明:RuntimePropertyExplicitly 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.
- 指定者:
initializeFrom在接口中RuntimeProperty<T>- 参数:
extractFrom-Propertiesobject containing key-value pairs usually passed from connection string.exceptionInterceptor- exceptionInterceptor
-
initializeFrom
public void initializeFrom(Reference ref, ExceptionInterceptor exceptionInterceptor)
- 指定者:
initializeFrom在接口中RuntimeProperty<T>
-
resetValue
public void resetValue()
从接口复制的说明:RuntimePropertyReset to initial value (default or defined in connection string/Properties)- 指定者:
resetValue在接口中RuntimeProperty<T>
-
isExplicitlySet
public boolean isExplicitlySet()
- 指定者:
isExplicitlySet在接口中RuntimeProperty<T>
-
addListener
public void addListener(RuntimeProperty.RuntimePropertyListener l)
从接口复制的说明:RuntimePropertyAdd listener for this property changes.- 指定者:
addListener在接口中RuntimeProperty<T>- 参数:
l-RuntimeProperty.RuntimePropertyListener
-
removeListener
public void removeListener(RuntimeProperty.RuntimePropertyListener listener)
- 指定者:
removeListener在接口中RuntimeProperty<T>
-
invokeListeners
protected void invokeListeners()
-
getValue
public T getValue()
从接口复制的说明:RuntimePropertyGet internal value representation as Object.- 指定者:
getValue在接口中RuntimeProperty<T>- 返回:
- value
-
getInitialValue
public T getInitialValue()
从接口复制的说明:RuntimePropertyGet initial value (default or defined in connection string/Properties)- 指定者:
getInitialValue在接口中RuntimeProperty<T>- 返回:
- value
-
getStringValue
public String getStringValue()
从接口复制的说明:RuntimePropertyGet internal value representation as String.- 指定者:
getStringValue在接口中RuntimeProperty<T>- 返回:
- value
-
setValueInternal
public void setValueInternal(String value, ExceptionInterceptor exceptionInterceptor)
Set the value of a property from a string value. It involves thePropertyDefinition.parseObject(String, ExceptionInterceptor)to validate and parse the string.- 参数:
value- valueexceptionInterceptor- exception interceptor
-
setValueInternal
public void setValueInternal(T value, String valueAsString, ExceptionInterceptor exceptionInterceptor)
Internal method for setting property value; ignoring the RUNTIME_NOT_MODIFIABLE flag.- 参数:
value- valuevalueAsString- value represented by StringexceptionInterceptor- exception interceptor
-
checkRange
protected void checkRange(T val, String valueAsString, ExceptionInterceptor exceptionInterceptor)
For range-based property, checks that value fit into range given by PropertyDefinition.- 参数:
val- valuevalueAsString- value represented by StringexceptionInterceptor- exception interceptor
-
setValue
public void setValue(T value)
从接口复制的说明:RuntimePropertySet the object value of a property directly. Validation against allowable values will be performed.- 指定者:
setValue在接口中RuntimeProperty<T>- 参数:
value- value
-
setValue
public void setValue(T value, ExceptionInterceptor exceptionInterceptor)
从接口复制的说明:RuntimePropertySet the object value of a property directly. Validation against allowable values will be performed.- 指定者:
setValue在接口中RuntimeProperty<T>- 参数:
value- valueexceptionInterceptor- exception interceptor
-
-