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

Extend CacheStream interface to allow for Serializable lambdas

    XMLWordPrintable

Details

    Description

      Recently it was found that we could add multiple overrides of a method where it was using a FunctionalInterface but also make that interface extend Serializable. This would allow for provided lambdas to be instantly serializable since the JVM will pick the most specific argument.

      Example:

      CacheStream filter(Predicate<? super R> predicate);
      

      vs

      CacheStream filter(SerializablePredicate<? super R> predicate);
      

      Attachments

        Activity

          People

            wburns@redhat.com Will Burns
            wburns@redhat.com Will Burns
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: