Interface IStorageManager


public interface IStorageManager
  • Field Details

    • TIMINGS

      static final List<Long> 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

      void clearDiscoveries(UUID uuid)
      Removes all discoveries matching a player.
      Parameters:
      uuid - player uuid
    • clearDiscovery

      void clearDiscovery(UUID uuid, String regionId)
      Removes a specific discovery matching a player.
      Parameters:
      uuid - player uuid
      regionId - region id
    • deleteAccount

      void deleteAccount(UUID uuid)
    • removeCachedAccount

      CompletableFuture<Void> removeCachedAccount(UUID uuid)
      Removes an account from the storage cache and saves its data.
      Parameters:
      uuid - player's UUID
    • getDatabaseUuid

      default String getDatabaseUuid(UUID uuid)
      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

      default List<Long> getTimings()
    • getTimingsAverage

      default long getTimingsAverage()