ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yakov Zhdanov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-25) Need to add separate configuration bean to all SPIs
Date Mon, 01 Dec 2014 12:53:12 GMT

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

Yakov Zhdanov updated IGNITE-25:
--------------------------------
    Description: 
Currently all SPIs have getters and setters directly on the SPI class which makes it impossible
to reuse the same configuration for different grids.

A better approach is have a configuration bean for every SPI:
# GridSomeSpiConfiguration class should have method {{spiClass()}} as follows:
{code}
interface GridSpiConfiguration {
    public abstract Class<?> spiClass()
}

class GridMySpiConfiguration implements GridSpiConfiguration {
    public Class<?> spiClass() {
        return GridMySpi.class;
    }
    ...
}
{code}
# The naming convention for SPI configuration class should be {{GridMySpiConfiguration}}.
# GridConfiguration class should be refactored to work with SPI configuration classes.
# Every SPI needs to have a constructor that receives the configuration as a parameter.
# All the tests (and test framework) need to be updated.

> Need to add separate configuration bean to all SPIs
> ---------------------------------------------------
>
>                 Key: IGNITE-25
>                 URL: https://issues.apache.org/jira/browse/IGNITE-25
>             Project: Ignite
>          Issue Type: Task
>            Reporter: Yakov Zhdanov
>            Assignee: Yakov Zhdanov
>             Fix For: sprint-1
>
>
> Currently all SPIs have getters and setters directly on the SPI class which makes it
impossible to reuse the same configuration for different grids.
> A better approach is have a configuration bean for every SPI:
> # GridSomeSpiConfiguration class should have method {{spiClass()}} as follows:
> {code}
> interface GridSpiConfiguration {
>     public abstract Class<?> spiClass()
> }
> class GridMySpiConfiguration implements GridSpiConfiguration {
>     public Class<?> spiClass() {
>         return GridMySpi.class;
>     }
>     ...
> }
> {code}
> # The naming convention for SPI configuration class should be {{GridMySpiConfiguration}}.
> # GridConfiguration class should be refactored to work with SPI configuration classes.
> # Every SPI needs to have a constructor that receives the configuration as a parameter.
> # All the tests (and test framework) need to be updated.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message