Stanislav Lukyanov created IGNITE-8952:
------------------------------------------
Summary: Move CacheStore::loadCache to a separate interface
Key: IGNITE-8952
URL: https://issues.apache.org/jira/browse/IGNITE-8952
Project: Ignite
Issue Type: Bug
Reporter: Stanislav Lukyanov
3rd party persistence has three way of interacting with the backing storage:
- JCache's CacheLoader methods for read-through
- JCache's CacheWriter methods for write-through
- Ignite's CacheStore::loadCache for bulk cache preloading
Usually, one just uses a CacheStore implementation and provides a no-op
implementation for the methods that are not needed (e.g. no-op implementation
for write() if write-through isn't used). However, this adds certain redundancy.
In particular, if a user only wants cache preloading (loadCache()) but no
read-through or write-through, they will need to provide a bunch of these no-op
methods, which can seem messy.
Instead, it would be nice to move loadCache() method to a separate interface,
say CachePreloader. This way we'll have 4 interfaces:
- JCache's CacheLoader for read-through
- JCache's CacheWriter for write-through
- Ignite's CachePreloader for loadCache()
- Ignite's CacheStore for all three together
One can either choose any combination of loader, writer and preloader, OR set
the store.
The task is to
- extract CacheStore::loadCache into a new interface CachePreloader
- add CacheConfiguration::setCachePreloader
- make sure that setCachePreloader works alone or in combination with loader
and writer, and doesn't work with store
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)