org.keycloak.storage.federated

## Interface UserBrokerLinkFederatedStorage.Streams

- All Superinterfaces:
    UserBrokerLinkFederatedStorage
  All Known Subinterfaces:
    UserFederatedStorageProvider.Streams
  All Known Implementing Classes:
    JpaUserFederatedStorageProvider
  Enclosing interface:
    UserBrokerLinkFederatedStorage

      public static interface UserBrokerLinkFederatedStorage.Streams
      extends UserBrokerLinkFederatedStorage

  The `UserBrokerLinkFederatedStorage.Streams` interface makes all collection-based methods in `UserBrokerLinkFederatedStorage` default by providing implementations that delegate to the `Stream`-based variants instead of the other way around.

  It allows for implementations to focus on the `Stream`-based approach for processing sets of data and benefit from the potential memory and performance optimizations of that approach.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.keycloak.storage.federated.UserBrokerLinkFederatedStorage

      `UserBrokerLinkFederatedStorage.Streams`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default Set<FederatedIdentityModel>` | `getFederatedIdentities(String userId, RealmModel realm)`
    `Stream<FederatedIdentityModel>` | `getFederatedIdentitiesStream(String userId, RealmModel realm)` Obtains the identities of the federated user identified by `userId`.

    - ### Methods inherited from interface org.keycloak.storage.federated.UserBrokerLinkFederatedStorage

      `addFederatedIdentity, getFederatedIdentity, getUserByFederatedIdentity, preRemove, removeFederatedIdentity, updateFederatedIdentity`

- - ### Method Detail

    - #### getFederatedIdentities

          default Set<FederatedIdentityModel> getFederatedIdentities(String userId,
                                                                     RealmModel realm)

      Specified by:
        `getFederatedIdentities` in interface `UserBrokerLinkFederatedStorage`

    - #### getFederatedIdentitiesStream

          Stream<FederatedIdentityModel> getFederatedIdentitiesStream(String userId,
                                                                      RealmModel realm)

      Description copied from interface: `UserBrokerLinkFederatedStorage`
      Obtains the identities of the federated user identified by `userId`.
      Specified by:
        `getFederatedIdentitiesStream` in interface `UserBrokerLinkFederatedStorage`
      Parameters:
        `userId` - the user identifier.
        `realm` - a reference to the realm.
      Returns:
        a non-null `Stream` of federated identities associated with the user.

Copyright © 2021 JBoss by Red Hat. All rights reserved.