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

compute* implementations for Hot Rod clients

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • None
    • Hot Rod

      for (; ; ) {
      VersionedValue<V> versioned = cache.getWithMetadata(key);
      if (versioned != null)

      { return versioned.getValue(); }

      V newValue = f(key);
      if (cache.putIfAbsent(key, newValue))

      { return newValue; }

      }
      (idea
      computeIfAbsent(userId, Function<K, V> f)
      getOrLock
      If locked > v = f() then putAndUnlock(userId, v)

            ttarrant@redhat.com Tristan Tarrant
            ttarrant@redhat.com Tristan Tarrant
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: