ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stanislav Lukyanov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-11141) Add Java method to create a cache from a template
Date Wed, 30 Jan 2019 13:04:00 GMT
Stanislav Lukyanov created IGNITE-11141:

             Summary: Add Java method to create a cache from a template
                 Key: IGNITE-11141
                 URL: https://issues.apache.org/jira/browse/IGNITE-11141
             Project: Ignite
          Issue Type: Task
            Reporter: Stanislav Lukyanov

Currently cache templates can only be used via REST or SQL: https://apacheignite.readme.io/docs/cache-template.
It seems reasonable to add the same functionality to Java.

The most flexible way would probably be to add a method like `cacheConfiguration(String)`
that would return a configuration of a template with the given name. Then to create a cache
from a template one would write code like this
CacheConfiguration cfg = ignite.cacheConfiguration("myTemplate");

As a bonus, the `cacheConfiguration(String)` method may work with regular caches too. For
them it would be a shortcut for `ignite.cache("myCache").getConfiguration()`.

This message was sent by Atlassian JIRA

View raw message