From cafe8df3a9ab743d0632cee094c2f2611fb8aeda Mon Sep 17 00:00:00 2001 From: Gravita Date: Thu, 17 Dec 2020 23:56:11 +0700 Subject: [PATCH] [FEATURE] final SessionStorage API --- .../auth/session/MemorySessionStorage.java | 20 +++++++++++++++++++ .../auth/session/SessionStorage.java | 4 ++++ 2 files changed, 24 insertions(+) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/session/MemorySessionStorage.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/session/MemorySessionStorage.java index bb1043d9..7676bdab 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/session/MemorySessionStorage.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/session/MemorySessionStorage.java @@ -71,6 +71,26 @@ public void clear() { uuidIndex.clear(); } + @Override + public void lockSession(UUID sessionUUID) { + + } + + @Override + public void lockUser(UUID userUUID) { + + } + + @Override + public void unlockSession(UUID sessionUUID) { + + } + + @Override + public void unlockUser(UUID userUUID) { + + } + private void removeUuidFromIndexSet(Set set, Entry e, UUID session) { set.remove(e); if(set.isEmpty()) { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/session/SessionStorage.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/session/SessionStorage.java index e576c07f..a1ac65e2 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/session/SessionStorage.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/session/SessionStorage.java @@ -20,6 +20,10 @@ public boolean deleteSessionsByUserUUID(UUID userUUID) { return true; } public abstract void clear(); + public abstract void lockSession(UUID sessionUUID); + public abstract void lockUser(UUID userUUID); + public abstract void unlockSession(UUID sessionUUID); + public abstract void unlockUser(UUID userUUID); public void init(LaunchServer server) { this.server = server;