Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-14011

Complement methods that operate on collections in the providers in KeycloakSession with Stream

    XMLWordPrintable

Details

    • Epic
    • Status: Closed
    • Major
    • Resolution: Done
    • None
    • 13.0.0
    • None
    • Streamification
    • Done
    • Keycloak Sprint 39, Keycloak Sprint 40, Keycloak Sprint 41, Keycloak Sprint 42, Keycloak Sprint 43, Keycloak Sprint 44, Keycloak Sprint 45, Keycloak Sprint 46, Keycloak Sprint 47, Keycloak Sprint 48, Keycloak Sprint 49, Keycloak Sprint 50
    • NEW
    • NEW

    Description

      What

      Currently the providers (e.g. RealmProvider, ClientProvider) accessible (in)directly from KeycloakSession operate on List and similar collections.

      Consequently, the List operations are realized in memory even when only needed temporarily to be later filtered out like in this piece of code.

      Thus the stream variants of the methods should be created, with backward compatibility in mind.

      This epic spans from the lowest JPA layer up to REST endpoints which should return Stream<T> instead of List<T>. Using StreamingOutput might be a more performant option for the streamed data.

      Acceptance criteria

      • All interfaces mentioned above have Stream counterparts for operations that currently operate on collections
      • REST endpoints preferentially use Stream<T> over the current collections
      • JPA preferentially use streams for obtaining query results where applicable

      Attachments

        Issue Links

          Activity

            People

              hmlnarik@redhat.com Hynek Mlnařík
              hmlnarik@redhat.com Hynek Mlnařík
              Martin Kanis, Stefan Guilhen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: