You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by Oscar Westra van Holthe - Kind <os...@westravanholthe.nl> on 2022/03/09 09:01:59 UTC
A note on Service Provider Interfaces (SPI) WAS: Re: Request for comments: new parsing & formatting interface
On Wed, 9 Mar 2022 at 09:06, Ryan Skraba <ry...@skraba.com> wrote:
> I'm not sure about the factory/SPI approach -- it almost seems like
> these classes would need to be explicitly chosen and configured by the
> user, as opposed to plugged in. I haven't given it too much thought
> though! Where would a pluggable version be appropriate?
>
That's the beauty of a SPI: it's automatically discovered using the
java.util.ServiceLoader.
We could also use this to automatically register logical types, as opposed
to manually registering them via LogicalTypes#register(...) or on e.g. the
Maven plugin.
Kind regards,
Oscar
--
✉️ Oscar Westra van Holthe - Kind <os...@westravanholthe.nl>