public class UserCache extends Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
UserCache.Entry |
(package private) class |
UserCache.JsonConverter |
Modifier and Type | Field and Description |
---|---|
private Deque<com.mojang.authlib.GameProfile> |
byAccessTime |
private Map<String,UserCache.Entry> |
byName |
private Map<UUID,UserCache.Entry> |
byUuid |
private File |
cacheFile |
private static TypeToken<List<UserCache.Entry>> |
ENTRY_LIST_TYPE |
static SimpleDateFormat |
EXPIRATION_DATE_FORMAT |
protected Gson |
gson |
private com.mojang.authlib.GameProfileRepository |
profileRepository |
private static boolean |
useRemote |
Constructor and Description |
---|
UserCache(com.mojang.authlib.GameProfileRepository profileRepository,
File cacheFile) |
Modifier and Type | Method and Description |
---|---|
void |
add(com.mojang.authlib.GameProfile gameProfile) |
private void |
add(com.mojang.authlib.GameProfile profile,
Date date) |
com.mojang.authlib.GameProfile |
findByName(String string) |
private static com.mojang.authlib.GameProfile |
findProfileByName(com.mojang.authlib.GameProfileRepository repository,
String name) |
com.mojang.authlib.GameProfile |
getByUuid(UUID uUID) |
private UserCache.Entry |
getEntry(UUID uUID) |
private List<UserCache.Entry> |
getLastAccessedEntries(int int2) |
void |
load() |
void |
save() |
static void |
setUseRemote(boolean value) |
private static boolean |
shouldUseRemote() |
public static final SimpleDateFormat EXPIRATION_DATE_FORMAT
private static boolean useRemote
private static final TypeToken<List<UserCache.Entry>> ENTRY_LIST_TYPE
private final Map<String,UserCache.Entry> byName
private final Map<UUID,UserCache.Entry> byUuid
private final Deque<com.mojang.authlib.GameProfile> byAccessTime
private final com.mojang.authlib.GameProfileRepository profileRepository
protected final Gson gson
private final File cacheFile
public UserCache(com.mojang.authlib.GameProfileRepository profileRepository, File cacheFile)
private static com.mojang.authlib.GameProfile findProfileByName(com.mojang.authlib.GameProfileRepository repository, String name)
public static void setUseRemote(boolean value)
private static boolean shouldUseRemote()
public void add(com.mojang.authlib.GameProfile gameProfile)
private void add(com.mojang.authlib.GameProfile profile, Date date)
private UserCache.Entry getEntry(UUID uUID)
public void load()
public void save()
private List<UserCache.Entry> getLastAccessedEntries(int int2)