Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-38505

Cache APIs do not support atomic actions from JSR-107

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Awaiting Review
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.0
    • Fix Version/s: None
    • Component/s: Kernel
    • Previous Issue Keys:
      KNL-1245

      Description

      See KNL-1162
      There are JSR-107 methods in the Cache API which are atomic (or nearly so anyway) that could help with making invalidating, dependent, or linked caches work.

      //JSR-107 V getAndPut(K key, V value);
      //JSR-107 boolean putIfAbsent(K key, V value);
      //JSR-107 boolean remove(K key, V oldValue);
      //JSR-107 V getAndRemove(K key);
      //JSR-107 boolean replace(K key, V oldValue, V newValue);
      //JSR-107 boolean replace(K key, V value);
      //JSR-107 V getAndReplace(K key, V value);

      NOTE: these were left out to make it more likely to be compatible with caching systems like memcached that do not really support this capability (at least, not completely)

      NOTE: I added Matthew Buckett's related comments below (from other tickets)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  k1team KERNEL TEAM (Inactive)
                  Reporter:
                  buckett Matthew Buckett
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Git Source Code