Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-8952

Move CacheStore::loadCache to a separate interface

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            slukyanov Stanislav Lukyanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: