JavaScript is disabled on your browser.
All Implemented Interfaces:
IUserMap
public class ModernUserMap
extends com.google.common.cache.CacheLoader<UUID ,User >
implements IUserMap
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.cache.CacheLoader
com.google.common.cache.CacheLoader.InvalidCacheLoadException, com.google.common.cache.CacheLoader.UnsupportedLoadingOperationException
Constructor Summary
Constructors
Method Summary
All Methods Instance Methods Concrete Methods
void
void
Gets all the UUIDs of every User which has joined.
long
Gets the current amount of users loaded into memory.
Gets the name to UUID cache.
int
Gets the amount of users stored by Essentials.
void
Gets a User by the given UUID in the cache, if present, otherwise loads the user without placing them in the cache.
void
Methods inherited from class com.google.common.cache.CacheLoader
asyncReloading, from, from, loadAll, reload
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
Method Details
getAllUserUUIDs
Description copied from interface: IUserMap
Gets all the UUIDs of every User which has joined.
Specified by:
getAllUserUUIDs
in interface IUserMap
Returns:
the UUIDs of all Users.
getCachedCount
public long getCachedCount ()
Description copied from interface: IUserMap
Gets the current amount of users loaded into memory.
Specified by:
getCachedCount
in interface IUserMap
Returns:
the amount of users loaded into memory.
getUserCount
public int getUserCount ()
Description copied from interface: IUserMap
Gets the amount of users stored by Essentials.
Specified by:
getUserCount
in interface IUserMap
Returns:
the amount of users stored by Essentials.
addCachedNpcName
public void addCachedNpcName (UUID uuid,
String name)
load
Specified by:
load
in class com.google.common.cache.CacheLoader<UUID ,User >
Throws:
Exception
loadUncachedUser
Description copied from interface: IUserMap
Gets a User by the given UUID in the cache, if present, otherwise loads the user without placing them in the cache.
Ideally to be used when running operations on all stored users.
Specified by:
loadUncachedUser
in interface IUserMap
Parameters:
uuid
- the UUID of the user to get.
Returns:
the User with the given UUID, or null if not found.
getNameCache
Description copied from interface: IUserMap
Gets the name to UUID cache.
Specified by:
getNameCache
in interface IUserMap
Returns:
the name to UUID cache.
blockingSave
public void blockingSave ()
invalidate
public void invalidate (UUID uuid)
shutdown
public void shutdown ()