Uploaded image for project: 'Openfire'
  1. Openfire
  2. OF-1712

Improved API for locking Cache entries

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.3.2
    • Fix Version/s: 4.4.0
    • Component/s: Core
    • Labels:
      None

      Description

      It is currently possibly to lock a cache entry using a construct similar to ...

      final Lock lock = CacheFactory.getLock(key, cache);
      try {
          lock.lock();
          ...
      } finally {
          lock.unlock();
      }
      

      Intuitively, it would make more sense if the lock was created from the cache itself. It would also allow stronger type of the value of the key (currently, any object can be passed in, which will cause run time errors if the wrong key is used in a clustered cache).

        Attachments

          Activity

            People

            • Assignee:
              gdt Greg Thomas
              Reporter:
              gdt Greg Thomas
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: