Interface IStorageManager
public interface IStorageManager
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclearDiscoveries(UUID uuid) Removes all discoveries matching a player.voidclearDiscovery(UUID uuid, String regionId) Removes a specific discovery matching a player.voiddeleteAccount(UUID uuid) getAccount(UUID uuid) Gets a player's account from the storage.Gets a map of currently cached accounts.default StringgetDatabaseUuid(UUID uuid) Gets a UUID safe to use in databases.default longremoveCachedAccount(UUID uuid) Removes an account from the storage cache and saves its data.default voidtiming(long ms)
-
Field Details
-
TIMINGS
-
-
Method Details
-
getAccount
Gets a player's account from the storage. This will return an account stored in the cache. If no account is found in the cache a new account will be fetched and added to the cache.- Parameters:
uuid- player's UUID- Returns:
- player's account
-
getCachedAccounts
ConcurrentMap<UUID,RPGRegionsAccount> getCachedAccounts()Gets a map of currently cached accounts.- Returns:
- map of cached accounts
-
clearDiscoveries
Removes all discoveries matching a player.- Parameters:
uuid- player uuid
-
clearDiscovery
Removes a specific discovery matching a player.- Parameters:
uuid- player uuidregionId- region id
-
deleteAccount
-
removeCachedAccount
Removes an account from the storage cache and saves its data.- Parameters:
uuid- player's UUID
-
getDatabaseUuid
Gets a UUID safe to use in databases.- Parameters:
uuid- player's UUID- Returns:
- new string uuid to use in databases
-
timing
default void timing(long ms) -
getTimings
-
getTimingsAverage
default long getTimingsAverage()
-