Class InMemorySessionRepository

java.lang.Object
org.springframework.ai.session.InMemorySessionRepository
All Implemented Interfaces:
SessionRepository

public final class InMemorySessionRepository extends Object implements SessionRepository
A thread-safe SessionRepository in memory, for tests and demos: the sessions are lost on restart and not shared across instances. A session and its log are kept together, and every mutation is one ConcurrentHashMap.compute(K, java.util.function.BiFunction<? super K, ? super V, ? extends V>).
Since:
2.1.0
Author:
Christian Tzolov