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

Extend CacheStream interface to allow for Serializable lambdas

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 9.0.0.Final
    • None
    • Clustered Executor
    • None

      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);
      

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

                Created:
                Updated:
                Resolved: