Interface SnapshotReader<S>

Type Parameters:
S - the type of custom session state
All Known Subinterfaces:
SessionStore<S>
All Known Implementing Classes:
CosmosSessionStore, DynamoDbSessionStore, FileSessionStore, FirestoreSessionStore, InMemorySessionStore, MongoSessionStore, PostgresSessionStore

public interface SnapshotReader<S>
Read side of a session store.
  • Method Details

    • getSnapshot

      SessionSnapshot<S> getSnapshot(GetSnapshotOptions opts)
      Retrieves a session snapshot.

      When GetSnapshotOptions.getSnapshotId() is set the store returns that specific snapshot. When GetSnapshotOptions.getSessionId() is set the store resolves and returns the latest leaf snapshot for that session. Returns null if no matching snapshot exists.

      Parameters:
      opts - options specifying which snapshot to retrieve; exactly one of snapshotId/sessionId must be set
      Returns:
      the matching snapshot, or null if none exists