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

Add a default compute function to the Cache interface

    XMLWordPrintable

Details

    • Feature Request
    • Status: New (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Core
    • None

    Description

      Java 8 has extended the Map interface with computeIfAbsent and putIfAbsent methods to support memoization. We could take this one step further by allowing setting a default mapping function using the Function<? super K,? extends V> signature so that invoking a get operation on a non-existent or expired entry will compute it and store it in the cache.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: