com.mysql.cj.conf

## Interface RuntimeProperty<T>

    public interface RuntimeProperty<T>

### Nested Class Summary

Nested Classes
`static interface` `RuntimeProperty.RuntimePropertyListener`

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `addListener(RuntimeProperty.RuntimePropertyListener l)` Add listener for this property changes.
`T` `getInitialValue()` Get initial value (default or defined in connection string/Properties)
`PropertyDefinition<T>` `getPropertyDefinition()`
`String` `getStringValue()` Get internal value representation as String.
`T` `getValue()` Get internal value representation as Object.
`void` `initializeFrom(Properties extractFrom, ExceptionInterceptor exceptionInterceptor)` Explicitly set value of this RuntimeProperty according to the self-titled property value contained in extractFrom.
`void` `initializeFrom(Reference ref, ExceptionInterceptor exceptionInterceptor)`
`boolean` `isExplicitlySet()`
`void` `removeListener(RuntimeProperty.RuntimePropertyListener l)`
`void` `resetValue()` Reset to initial value (default or defined in connection string/Properties)
`void` `setValue(T value)` Set the object value of a property directly.
`void` `setValue(T value, ExceptionInterceptor exceptionInterceptor)` Set the object value of a property directly.

### Method Detail

#### getPropertyDefinition

    PropertyDefinition<T> getPropertyDefinition()

#### initializeFrom

    void initializeFrom(Properties extractFrom,
                        ExceptionInterceptor exceptionInterceptor)

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` object containing key-value pairs usually passed from connection string.
  `exceptionInterceptor` - exceptionInterceptor

#### initializeFrom

    void initializeFrom(Reference ref,
                        ExceptionInterceptor exceptionInterceptor)

#### resetValue

    void resetValue()

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

#### isExplicitlySet

    boolean isExplicitlySet()

#### addListener

    void addListener(RuntimeProperty.RuntimePropertyListener l)

Add listener for this property changes.

Parameters:
  `l` - `RuntimeProperty.RuntimePropertyListener`

#### removeListener

    void removeListener(RuntimeProperty.RuntimePropertyListener l)

#### getValue

    T getValue()

Get internal value representation as Object.

Returns:
  value

#### getInitialValue

    T getInitialValue()

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

Returns:
  value

#### getStringValue

    String getStringValue()

Get internal value representation as String.

Returns:
  value

#### setValue

    void setValue(T value)

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

Parameters:
  `value` - value

#### setValue

    void setValue(T value,
                  ExceptionInterceptor exceptionInterceptor)

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

Parameters:
  `value` - value
  `exceptionInterceptor` - exception interceptor

Copyright © 2016, 2026, Oracle and/or its affiliates.