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 TypeMethodDescriptionLoad 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
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
Save the given session identified by the given UUID.- Parameters:
id
- the UUIDsession
- a session- Throws:
IOException
- thrown on read error
-