ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilya Lantukh <ilant...@apache.org>
Subject Re: DataRegionConfiguration is a FINAL class but could we make it not final?
Date Thu, 21 Mar 2019 11:35:34 GMT
Hi,

I couldn't find any strong reason why this class needs to be final. So, if
that is a restriction for you, feel free to create a ticket and submit a
pull request.

On Fri, Mar 15, 2019 at 11:47 PM hlopez <hmmlopez@gmail.com> wrote:

> Is there a very good reason why the DataRegionConfiguration is a *FINAL*
> class?
>
> I would like to be able to extend the DataRegionConfiguration.
>
> In my extended class I would like to add a new method for the
> *setMaxSize()*
> and *setInitialSize()* for example where the input is of the type
> *org.springframework.util.unit.DataSize* instead of *long*.
>
> This way I can do *super.setMaxSize(maxSize.toBytes())* which will convert
> a
> property set in my application.properties in a form like *"1GB"* to the
> corresponding bytes by Spring Boot automatically.
>
> see [1]  Properties Conversion
> <
> https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-conversion-datasize>
>
>
> [1]
>
> https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-conversion-datasize
>
> The only option I have now is to Wrap the class and delegate the methods,
> but that makes me create two beans instead of one for each
> DataRegionConfiguration.
>
>
>
>
>
> --
> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message