Class InMemoryReactiveSessionRegistry
java.lang.Object
org.springframework.security.core.session.InMemoryReactiveSessionRegistry
- All Implemented Interfaces:
ReactiveSessionRegistry
Provides an in-memory implementation of
ReactiveSessionRegistry.- Since:
- 6.3
-
Constructor Summary
ConstructorsConstructorDescriptionInMemoryReactiveSessionRegistry(ConcurrentMap<Object, Set<String>> sessionIdsByPrincipal, Map<String, ReactiveSessionInformation> sessionById) -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<ReactiveSessionInformation>getAllSessions(Object principal) Gets all the knownReactiveSessionInformationinstances for the specified principal.reactor.core.publisher.Mono<ReactiveSessionInformation>getSessionInformation(String sessionId) Gets theReactiveSessionInformationfor the specified session identifier.reactor.core.publisher.Mono<ReactiveSessionInformation>removeSessionInformation(String sessionId) Removes the specified session from the registry.reactor.core.publisher.Mono<Void>saveSessionInformation(ReactiveSessionInformation information) Saves theReactiveSessionInformationreactor.core.publisher.Mono<ReactiveSessionInformation>updateLastAccessTime(String sessionId) Updates the last accessed time of theReactiveSessionInformation
-
Constructor Details
-
InMemoryReactiveSessionRegistry
public InMemoryReactiveSessionRegistry() -
InMemoryReactiveSessionRegistry
public InMemoryReactiveSessionRegistry(ConcurrentMap<Object, Set<String>> sessionIdsByPrincipal, Map<String, ReactiveSessionInformation> sessionById)
-
-
Method Details
-
getAllSessions
Description copied from interface:ReactiveSessionRegistryGets all the knownReactiveSessionInformationinstances for the specified principal.- Specified by:
getAllSessionsin interfaceReactiveSessionRegistry- Parameters:
principal- the principal- Returns:
- the
ReactiveSessionInformationinstances associated with the principal
-
saveSessionInformation
public reactor.core.publisher.Mono<Void> saveSessionInformation(ReactiveSessionInformation information) Description copied from interface:ReactiveSessionRegistrySaves theReactiveSessionInformation- Specified by:
saveSessionInformationin interfaceReactiveSessionRegistry- Parameters:
information- theReactiveSessionInformationto save- Returns:
- a
Monothat completes when the session is saved
-
getSessionInformation
public reactor.core.publisher.Mono<ReactiveSessionInformation> getSessionInformation(String sessionId) Description copied from interface:ReactiveSessionRegistryGets theReactiveSessionInformationfor the specified session identifier.- Specified by:
getSessionInformationin interfaceReactiveSessionRegistry- Parameters:
sessionId- the session identifier- Returns:
- the
ReactiveSessionInformationfor the session.
-
removeSessionInformation
public reactor.core.publisher.Mono<ReactiveSessionInformation> removeSessionInformation(String sessionId) Description copied from interface:ReactiveSessionRegistryRemoves the specified session from the registry.- Specified by:
removeSessionInformationin interfaceReactiveSessionRegistry- Parameters:
sessionId- the session identifier- Returns:
- a
Monothat completes when the session is removed
-
updateLastAccessTime
public reactor.core.publisher.Mono<ReactiveSessionInformation> updateLastAccessTime(String sessionId) Description copied from interface:ReactiveSessionRegistryUpdates the last accessed time of theReactiveSessionInformation- Specified by:
updateLastAccessTimein interfaceReactiveSessionRegistry- Parameters:
sessionId- the session identifier- Returns:
- a
Monothat completes when the session is updated
-