Interface SessionStore

All Known Implementing Classes:
JsonFileSessionStore, VoidStore

public interface SessionStore
Commits sessions to disk.

Both load(UUID) and save(UUID, LocalSession) may be called at the same in different threads, so implementations should be aware of this issue.

  • Method Summary

    Modifier and Type
    Method
    Description
    load(UUID id)
    Load a session identified by the given UUID.
    void
    save(UUID id, LocalSession session)
    Save the given session identified by the given UUID.
  • Method Details

    • load

      LocalSession load(UUID id) throws IOException
      Load a session identified by the given UUID.

      If the session does not exist (has never been saved), then a new LocalSession must be returned.

      Parameters:
      id - the UUID
      Returns:
      a session
      Throws:
      IOException - thrown on read error
    • save

      void save(UUID id, LocalSession session) throws IOException
      Save the given session identified by the given UUID.
      Parameters:
      id - the UUID
      session - a session
      Throws:
      IOException - thrown on read error