Class DefaultCachedProfileResolver
java.lang.Object
com.github.juliarn.npclib.api.profile.DefaultCachedProfileResolver
- All Implemented Interfaces:
ProfileResolver,ProfileResolver.Cached
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classNested classes/interfaces inherited from interface com.github.juliarn.npclib.api.profile.ProfileResolver
ProfileResolver.Cached -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ProfileResolverprivate static final longprivate final Map<String, DefaultCachedProfileResolver.CacheEntry<UUID>> private final Map<UUID, DefaultCachedProfileResolver.CacheEntry<Profile.Resolved>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <K,V> V findCacheEntry(@NotNull Map<K, DefaultCachedProfileResolver.CacheEntry<V>> cache, K key) @NotNull CompletableFuture<Profile.Resolved> resolveProfile(@NotNull Profile profile)
-
Field Details
-
ENTRY_KEEP_ALIVE_TIME
private static final long ENTRY_KEEP_ALIVE_TIME -
delegate
-
nameToUniqueIdCache
-
uuidToProfileCache
private final Map<UUID,DefaultCachedProfileResolver.CacheEntry<Profile.Resolved>> uuidToProfileCache
-
-
Constructor Details
-
DefaultCachedProfileResolver
-
-
Method Details
-
findCacheEntry
@Nullable private static <K,V> V findCacheEntry(@NotNull @NotNull Map<K, DefaultCachedProfileResolver.CacheEntry<V>> cache, @NotNull K key) -
resolveProfile
@NotNull public @NotNull CompletableFuture<Profile.Resolved> resolveProfile(@NotNull @NotNull Profile profile) - Specified by:
resolveProfilein interfaceProfileResolver
-
fromCache
- Specified by:
fromCachein interfaceProfileResolver.Cached
-
fromCache
- Specified by:
fromCachein interfaceProfileResolver.Cached
-
fromCache
- Specified by:
fromCachein interfaceProfileResolver.Cached
-