Interface ReactiveSessionRepository<S extends Session>

Type Parameters:
S - the Session type
All Known Implementing Classes:
ReactiveMapSessionRepository, ReactiveMongoSessionRepository, ReactiveRedisSessionRepository

public interface ReactiveSessionRepository<S extends Session>
A repository interface for managing Session instances.
Since:
2.0
  • Method Details

    • createSession

      reactor.core.publisher.Mono<S> createSession()
      Creates a new Session that is capable of being persisted by this ReactiveSessionRepository.

      This allows optimizations and customizations in how the Session is persisted. For example, the implementation returned might keep track of the changes ensuring that only the delta needs to be persisted on a save.

      Returns:
      a new Session that is capable of being persisted by this ReactiveSessionRepository
    • save

      reactor.core.publisher.Mono<Void> save(S session)
      Ensures the Session created by createSession() is saved.

      Some implementations may choose to save as the Session is updated by returning a Session that immediately persists any changes. In this case, this method may not actually do anything.

      Parameters:
      session - the Session to save
      Returns:
      indicator of operation completion
    • findById

      reactor.core.publisher.Mono<S> findById(String id)
      Gets the Session by the Session.getId() or null if no Session is found.
      Parameters:
      id - the Session.getId() to lookup
      Returns:
      the Session by the Session.getId() or null if no Session is found.
    • deleteById

      reactor.core.publisher.Mono<Void> deleteById(String id)
      Deletes the Session with the given Session.getId() or does nothing if the Session is not found.
      Parameters:
      id - the Session.getId() to delete
      Returns:
      indicator of operation completion