Package org.springframework.security.core.session

# Class InMemoryReactiveSessionRegistry

java.lang.Object
org.springframework.security.core.session.InMemoryReactiveSessionRegistry

All Implemented Interfaces:
  `ReactiveSessionRegistry`

public class InMemoryReactiveSessionRegistry extends Object implements ReactiveSessionRegistry
Provides an in-memory implementation of `ReactiveSessionRegistry`.

Since:
  6.3

## Constructor Summary

Constructors
Constructor
Description
`InMemoryReactiveSessionRegistry()`
`InMemoryReactiveSessionRegistry(ConcurrentMap<Object,Set<String>> sessionIdsByPrincipal, Map<String,ReactiveSessionInformation> sessionById)`

## Method Summary

Modifier and Type
Method
Description
`reactor.core.publisher.Flux<ReactiveSessionInformation>`
`getAllSessions(Object principal)`
Gets all the known `ReactiveSessionInformation` instances for the specified principal.
`reactor.core.publisher.Mono<ReactiveSessionInformation>`
`getSessionInformation(String sessionId)`
Gets the `ReactiveSessionInformation` for 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 the `ReactiveSessionInformation`
`reactor.core.publisher.Mono<ReactiveSessionInformation>`
`updateLastAccessTime(String sessionId)`
Updates the last accessed time of the `ReactiveSessionInformation`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### InMemoryReactiveSessionRegistry

public InMemoryReactiveSessionRegistry()

### InMemoryReactiveSessionRegistry

public InMemoryReactiveSessionRegistry(ConcurrentMap<Object,Set<String>> sessionIdsByPrincipal, Map<String,ReactiveSessionInformation> sessionById)

## Method Details

### getAllSessions

public reactor.core.publisher.Flux<ReactiveSessionInformation> getAllSessions(Object principal)
Description copied from interface: `ReactiveSessionRegistry`
Gets all the known `ReactiveSessionInformation` instances for the specified principal.

Specified by:
  `getAllSessions` in interface `ReactiveSessionRegistry`
Parameters:
  `principal` - the principal
Returns:
  the `ReactiveSessionInformation` instances associated with the principal

### saveSessionInformation

public reactor.core.publisher.Mono<Void> saveSessionInformation(ReactiveSessionInformation information)
Description copied from interface: `ReactiveSessionRegistry`
Saves the `ReactiveSessionInformation`

Specified by:
  `saveSessionInformation` in interface `ReactiveSessionRegistry`
Parameters:
  `information` - the `ReactiveSessionInformation` to save
Returns:
  a `Mono` that completes when the session is saved

### getSessionInformation

public reactor.core.publisher.Mono<ReactiveSessionInformation> getSessionInformation(String sessionId)
Description copied from interface: `ReactiveSessionRegistry`
Gets the `ReactiveSessionInformation` for the specified session identifier.

Specified by:
  `getSessionInformation` in interface `ReactiveSessionRegistry`
Parameters:
  `sessionId` - the session identifier
Returns:
  the `ReactiveSessionInformation` for the session.

### removeSessionInformation

public reactor.core.publisher.Mono<ReactiveSessionInformation> removeSessionInformation(String sessionId)
Description copied from interface: `ReactiveSessionRegistry`
Removes the specified session from the registry.

Specified by:
  `removeSessionInformation` in interface `ReactiveSessionRegistry`
Parameters:
  `sessionId` - the session identifier
Returns:
  a `Mono` that completes when the session is removed

### updateLastAccessTime

public reactor.core.publisher.Mono<ReactiveSessionInformation> updateLastAccessTime(String sessionId)
Description copied from interface: `ReactiveSessionRegistry`
Updates the last accessed time of the `ReactiveSessionInformation`

Specified by:
  `updateLastAccessTime` in interface `ReactiveSessionRegistry`
Parameters:
  `sessionId` - the session identifier
Returns:
  a `Mono` that completes when the session is updated