public abstract class UserDataManager<K,U extends AbstractUserData<K>> extends java.lang.Object implements UserDataRegistry<K,U>
| 限定符和类型 | 字段和说明 |
|---|---|
protected @NotNull java.util.Map<K,U> |
dataCache |
protected @NotNull java.util.concurrent.ExecutorService |
executor |
protected @NotNull EasyPlugin |
plugin |
| 构造器和说明 |
|---|
UserDataManager(@NotNull EasyPlugin plugin) |
UserDataManager(@NotNull EasyPlugin plugin,
@NotNull java.util.concurrent.ExecutorService executor) |
UserDataManager(@NotNull EasyPlugin plugin,
@NotNull java.util.concurrent.ExecutorService executor,
@NotNull java.util.Map<K,U> cacheMap) |
| 限定符和类型 | 方法和说明 |
|---|---|
@NotNull java.util.Map<K,U> |
cache() |
abstract U |
emptyUser(K key) |
U |
errorUser(K key) |
@NotNull java.util.logging.Logger |
getLogger() |
protected @NotNull EasyPlugin |
getPlugin() |
@NotNull java.util.concurrent.CompletableFuture<U> |
load(K key,
@NotNull java.util.function.Supplier<java.lang.Boolean> cacheCondition) |
protected abstract U |
loadData(K key) |
<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) |
@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() |
protected abstract void |
saveData(U data) |
void |
shutdown() |
@NotNull java.util.concurrent.CompletableFuture<java.lang.Boolean> |
unload(K key,
boolean save) |
int |
unloadAll(boolean save) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitget, getNullable, getOptional, list, load, load, loadGroup, loadGroup, loadOnline, serializeKey, unload@NotNull protected final @NotNull EasyPlugin plugin
@NotNull protected final @NotNull java.util.concurrent.ExecutorService executor
@NotNull protected final @NotNull java.util.Map<K,U extends AbstractUserData<K>> dataCache
public UserDataManager(@NotNull
@NotNull EasyPlugin plugin)
public UserDataManager(@NotNull
@NotNull EasyPlugin plugin,
@NotNull
@NotNull java.util.concurrent.ExecutorService executor)
public UserDataManager(@NotNull
@NotNull EasyPlugin plugin,
@NotNull
@NotNull java.util.concurrent.ExecutorService executor,
@NotNull
@NotNull java.util.Map<K,U> cacheMap)
public void shutdown()
shutdown 在接口中 UserDataRegistry<K,U extends AbstractUserData<K>>@NotNull protected @NotNull EasyPlugin getPlugin()
@NotNull public @NotNull java.util.logging.Logger getLogger()
getLogger 在接口中 UserDataRegistry<K,U extends AbstractUserData<K>>@Nullable protected abstract U loadData(@NotNull K key) throws java.lang.Exception
java.lang.Exceptionprotected abstract void saveData(@NotNull
U data)
throws java.lang.Exception
java.lang.Exception@NotNull public @NotNull java.util.Map<K,U> cache()
cache 在接口中 UserDataRegistry<K,U extends AbstractUserData<K>>@NotNull public @NotNull java.util.concurrent.CompletableFuture<U> load(@NotNull K key, @NotNull @NotNull java.util.function.Supplier<java.lang.Boolean> cacheCondition)
load 在接口中 UserDataRegistry<K,U extends AbstractUserData<K>>@NotNull
public @NotNull java.util.concurrent.CompletableFuture<java.lang.Boolean> save(@NotNull
U user)
save 在接口中 UserDataRegistry<K,U extends AbstractUserData<K>>@NotNull
public @NotNull java.util.concurrent.CompletableFuture<java.lang.Boolean> unload(@NotNull
K key,
boolean save)
unload 在接口中 UserDataRegistry<K,U extends AbstractUserData<K>>@NotNull
public @NotNull java.util.concurrent.CompletableFuture<java.lang.Boolean> modify(@NotNull
K key,
@NotNull
@NotNull java.util.function.Consumer<U> consumer)
modify 在接口中 UserDataRegistry<K,U extends AbstractUserData<K>>@NotNull
public <V> @NotNull java.util.concurrent.CompletableFuture<V> peek(@NotNull
K key,
@NotNull
@NotNull java.util.function.Function<U,V> function)
peek 在接口中 UserDataRegistry<K,U extends AbstractUserData<K>>@NotNull public <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)
loadGroup 在接口中 UserDataRegistry<K,U extends AbstractUserData<K>>public void saveAll()
saveAll 在接口中 UserDataRegistry<K,U extends AbstractUserData<K>>public int unloadAll(boolean save)
unloadAll 在接口中 UserDataRegistry<K,U extends AbstractUserData<K>>Copyright © 2025. All rights reserved.