public interface UserDataRegistry<K,U extends UserData<K>>
限定符和类型 | 方法和说明 |
---|---|
@NotNull java.util.Map<K,U> |
cache() |
default U |
get(K key) |
@NotNull java.util.logging.Logger |
getLogger() |
default U |
getNullable(K key) |
default @NotNull java.util.Optional<U> |
getOptional(K key) |
default @Unmodifiable @NotNull java.util.Set<U> |
list() |
default @NotNull java.util.concurrent.CompletableFuture<U> |
load(K key) |
default @NotNull java.util.concurrent.CompletableFuture<U> |
load(K key,
boolean cache) |
@NotNull java.util.concurrent.CompletableFuture<U> |
load(K key,
@NotNull java.util.function.Supplier<java.lang.Boolean> cacheCondition) |
<T> @NotNull java.util.concurrent.CompletableFuture<java.util.Map<K,U>> |
loadGroup(@NotNull java.util.Collection<? extends T> users,
@NotNull java.util.function.Function<? super T,? extends K> function,
@NotNull java.util.function.Predicate<T> cacheCondition) |
default @NotNull java.util.concurrent.CompletableFuture<java.util.Map<K,U>> |
loadGroup(@NotNull java.util.Collection<K> allKeys) |
default @NotNull java.util.concurrent.CompletableFuture<java.util.Map<K,U>> |
loadGroup(@NotNull java.util.Collection<K> allKeys,
@NotNull java.util.function.Predicate<K> cacheCondition) |
default @NotNull java.util.concurrent.CompletableFuture<java.util.Map<K,U>> |
loadOnline(@NotNull java.util.function.Function<org.bukkit.entity.Player,? extends K> function) |
@NotNull java.util.concurrent.CompletableFuture<java.lang.Boolean> |
modify(K key,
@NotNull java.util.function.Consumer<U> consumer) |
<V> @NotNull java.util.concurrent.CompletableFuture<V> |
peek(K key,
@NotNull java.util.function.Function<U,V> function) |
@NotNull java.util.concurrent.CompletableFuture<java.lang.Boolean> |
save(U user) |
void |
saveAll() |
default java.lang.String |
serializeKey(K key) |
void |
shutdown() |
default @NotNull java.util.concurrent.CompletableFuture<java.lang.Boolean> |
unload(K key) |
@NotNull java.util.concurrent.CompletableFuture<java.lang.Boolean> |
unload(K key,
boolean save) |
int |
unloadAll(boolean save) |
void shutdown()
@NotNull @NotNull java.util.logging.Logger getLogger()
default java.lang.String serializeKey(@NotNull K key)
@NotNull default @NotNull java.util.concurrent.CompletableFuture<U> load(@NotNull K key, boolean cache)
@NotNull default @Unmodifiable @NotNull java.util.Set<U> list()
@NotNull @NotNull java.util.concurrent.CompletableFuture<U> load(@NotNull K key, @NotNull @NotNull java.util.function.Supplier<java.lang.Boolean> cacheCondition)
@NotNull @NotNull java.util.concurrent.CompletableFuture<java.lang.Boolean> save(@NotNull U user)
@NotNull default @NotNull java.util.concurrent.CompletableFuture<java.lang.Boolean> unload(@NotNull K key)
@NotNull @NotNull java.util.concurrent.CompletableFuture<java.lang.Boolean> unload(@NotNull K key, boolean save)
@NotNull @NotNull java.util.concurrent.CompletableFuture<java.lang.Boolean> modify(@NotNull K key, @NotNull @NotNull java.util.function.Consumer<U> consumer)
@NotNull <V> @NotNull java.util.concurrent.CompletableFuture<V> peek(@NotNull K key, @NotNull @NotNull java.util.function.Function<U,V> function)
@NotNull default @NotNull java.util.concurrent.CompletableFuture<java.util.Map<K,U>> loadOnline(@NotNull @NotNull java.util.function.Function<org.bukkit.entity.Player,? extends K> function)
@NotNull <T> @NotNull java.util.concurrent.CompletableFuture<java.util.Map<K,U>> loadGroup(@NotNull @NotNull java.util.Collection<? extends T> users, @NotNull @NotNull java.util.function.Function<? super T,? extends K> function, @NotNull @NotNull java.util.function.Predicate<T> cacheCondition)
@NotNull default @NotNull java.util.concurrent.CompletableFuture<java.util.Map<K,U>> loadGroup(@NotNull @NotNull java.util.Collection<K> allKeys, @NotNull @NotNull java.util.function.Predicate<K> cacheCondition)
@NotNull default @NotNull java.util.concurrent.CompletableFuture<java.util.Map<K,U>> loadGroup(@NotNull @NotNull java.util.Collection<K> allKeys)
void saveAll()
int unloadAll(boolean save)
Copyright © 2025. All rights reserved.