[ 
https://issues.apache.org/jira/browse/IGNITE-16159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kirill Tkalenko updated IGNITE-16159:
-------------------------------------
    Description: 
For the case of a hidden configuration (marked with *@InternalConfiguration*) 
in *ConfigurationNotificationEvent#config*, need to make it possible to obtain 
this configuration using not only the parent but also itself.

Example:

{noformat}
@Config
public class TableConfigurationSchema {
    @Value
    public String name;
}

@InternalConfiguration
public class ExtendedTableConfigurationSchema extends TableConfigurationSchema {
    @Value
    public String id;
}

...

tableCfg.name().listen(ctx -> {
        TableConfiguration tableConfig = ctx.config(TableConfiguration.class);
        ExtendedTableConfiguration tableExConfig = 
ctx.config(ExtendedTableConfiguration.class);

        assert tableConfig != null;
        assert tableExConfig != null;

        return CompletableFuture.completedFuture(null);
});
{noformat}

  was:
For the case of a hidden configuration (marked with *@InternalConfiguration*) 
in *ConfigurationNotificationEvent#config*, need to make it possible to obtain 
this configuration using not only the parent but also itself.

Example:

{noformat}
@Config
public class TableConfigurationSchema {
    @Value
    public String name;
}

@InternalConfiguration
public class ExtendedTableConfigurationSchema extends TableConfigurationSchema {
    @Value
    public String id;
}

...

tableCfg.name().listen(ctx -> {
        TableConfiguration tableConfig = ctx.config(TableConfiguration.class);
        ExtendedTableConfiguration tableExConfig = 
ctx.config(ExtendedTableConfiguration.class);

        assert tableConfig != null;
        assert tableExConfig != null;

        return CompletableFuture.completedFuture(null);
});
{noformat}



{{ExtendedTableConfiguration tbl = ctx.config(TableConfiguration.class)}} 
{{tbl}} contains  valid instance.

{{ExtendedTableConfiguration tbl = 
ctx.config(ExtendedTableConfiguration.class)}} 
{{tbl}} contains  {{null}}



> The method ConfigurationNotificationEvent#config works unexpectedly
> -------------------------------------------------------------------
>
>                 Key: IGNITE-16159
>                 URL: https://issues.apache.org/jira/browse/IGNITE-16159
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 3.0.0-alpha3
>            Reporter: Taras Ledkov
>            Assignee: Kirill Tkalenko
>            Priority: Major
>              Labels: Configuration, iep-55, ignite-3
>             Fix For: 3.0.0-alpha4
>
>
> For the case of a hidden configuration (marked with *@InternalConfiguration*) 
> in *ConfigurationNotificationEvent#config*, need to make it possible to 
> obtain this configuration using not only the parent but also itself.
> Example:
> {noformat}
> @Config
> public class TableConfigurationSchema {
>     @Value
>     public String name;
> }
> @InternalConfiguration
> public class ExtendedTableConfigurationSchema extends 
> TableConfigurationSchema {
>     @Value
>     public String id;
> }
> ...
> tableCfg.name().listen(ctx -> {
>         TableConfiguration tableConfig = ctx.config(TableConfiguration.class);
>         ExtendedTableConfiguration tableExConfig = 
> ctx.config(ExtendedTableConfiguration.class);
>         assert tableConfig != null;
>         assert tableExConfig != null;
>         return CompletableFuture.completedFuture(null);
> });
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to