You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Andrey Mashenkov (Jira)" <ji...@apache.org> on 2021/09/22 09:11:00 UTC

[jira] [Updated] (IGNITE-15382) Decouple API and implementation for Tuple and Schema.

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

Andrey Mashenkov updated IGNITE-15382:
--------------------------------------
    Description: 
TupleImpl implements a public API interface Tuple and resides in ignite-api module.
Public API implementation must be hidden from a user to avoid direct usage/instantiation.

This can be achieved in next ways
1. Move TupleImpl to an internal package of the e.g. ignite-table module and use ServiceLoader for tuple factory.
This introduces implicit module dependency and a new factory interface/class.
2. Make TupleImpl package-private class.
We will not be able to create a TupleImpl object directly, but seems it is ok to use factory methods.

  was:
For now, TupleImpl is a part of public API, but should be internal class.
SchemaBuilders, on the opposite, relates to a public API, but is hidden in schema-module.

With Jigsaw it is impossible to have packages of the same name in different modules.
Let's 
# Move TupleImpl to an internal package of the ignite-table module.
# Move SchemaBuilders to the public package of the ignite-api module.
# Use a ServiceLoader for factories for these classes in ignite-api module


> Decouple API and implementation for Tuple and Schema.
> -----------------------------------------------------
>
>                 Key: IGNITE-15382
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15382
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Andrey Mashenkov
>            Assignee: Andrey Mashenkov
>            Priority: Major
>              Labels: UX, ignite-3
>             Fix For: 3.0.0-alpha3
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> TupleImpl implements a public API interface Tuple and resides in ignite-api module.
> Public API implementation must be hidden from a user to avoid direct usage/instantiation.
> This can be achieved in next ways
> 1. Move TupleImpl to an internal package of the e.g. ignite-table module and use ServiceLoader for tuple factory.
> This introduces implicit module dependency and a new factory interface/class.
> 2. Make TupleImpl package-private class.
> We will not be able to create a TupleImpl object directly, but seems it is ok to use factory methods.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)