Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-9794

Allow Cache flushes to stores on demand via JMX trigger

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • Major
    • None
    • 10.0.0.Alpha1
    • Loaders and Stores
    • None

    Description

      We should introduce a

      flush(Publisher<MarshalledEntry<K, V>>)

      method to the AdvancedCacheWriter interface. This will simply iterate over the cache on a best-effort basis (concurrent updates to the cache may be missed) and write it's contents to the underlying store(s).

      The flush method should be called by the PersistenceManager when an appropriate trigger has been manually called by the user, for example JMX or REST.

      Adding this capability will allow for use-cases where users don't want to write to the underlying store during normal operation, however in certain circumstances they want to persist the data. To achieve this, the user can configure a store as normal, whilst setting the SKIP_CACHE_LOAD and SKIP_CACHE_STORE flags via AdvancedCache::withFlags.

      Alternatively, we could introduce a new attribute to store's which ensures that the store is always skipped except when flushing, e.g. "flush-only". This has the advantage of not requiring users to utilise flags and it will be possible to have multiple stores, some flush-only and other write-through/write-behind.

      Attachments

        Issue Links

          Activity

            People

              remerson@redhat.com Ryan Emerson
              remerson@redhat.com Ryan Emerson
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: