Class ImmutableSession
java.lang.Object
org.keycloak.models.sessions.infinispan.ImmutableSession
Helper class to map a list of user and client sessions, from Infinispan caches, into an immutable session.
It copies the data to a new instance to prevent observing changes made by other threads to the underlying cached instances.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stream<UserSessionModel>copyOf(KeycloakSession session, Collection<UserSessionEntity> entityList, SessionExpirationPredicates expiration, org.infinispan.Cache<EmbeddedClientSessionKey, SessionEntityWrapper<AuthenticatedClientSessionEntity>> cache) static UserSessionModelcopyOf(KeycloakSession session, RemoteUserSessionEntity entity, SessionExpirationPredicates expiration, org.infinispan.client.hotrod.RemoteCache<ClientSessionKey, RemoteAuthenticatedClientSessionEntity> cache, int batchSize) static voidreadOnly()
-
Constructor Details
-
ImmutableSession
public ImmutableSession()
-
-
Method Details
-
readOnly
public static void readOnly() -
copyOf
public static Stream<UserSessionModel> copyOf(KeycloakSession session, Collection<UserSessionEntity> entityList, SessionExpirationPredicates expiration, org.infinispan.Cache<EmbeddedClientSessionKey, SessionEntityWrapper<AuthenticatedClientSessionEntity>> cache) -
copyOf
public static UserSessionModel copyOf(KeycloakSession session, RemoteUserSessionEntity entity, SessionExpirationPredicates expiration, org.infinispan.client.hotrod.RemoteCache<ClientSessionKey, RemoteAuthenticatedClientSessionEntity> cache, int batchSize)
-