Move #refreshCachedData up the type hierarchy into PermissionHolder

This commit is contained in:
Luck
2017-11-08 22:59:22 +00:00
Unverified
parent a115ff8ce2
commit 14005563a3
7 changed files with 19 additions and 32 deletions
@@ -28,7 +28,6 @@ package me.lucko.luckperms.api;
import me.lucko.luckperms.api.caching.GroupData;
import java.util.OptionalInt;
import java.util.concurrent.CompletableFuture;
import javax.annotation.Nonnull;
@@ -64,13 +63,4 @@ public interface Group extends PermissionHolder {
@Override
GroupData getCachedData();
/**
* Refreshes and applies any changes to the cached group data.
*
* @return the task future
* @since 4.0
*/
@Nonnull
CompletableFuture<Void> refreshCachedData();
}
@@ -36,6 +36,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedSet;
import java.util.concurrent.CompletableFuture;
import java.util.function.Predicate;
import javax.annotation.Nonnull;
@@ -80,6 +81,15 @@ public interface PermissionHolder {
@Nonnull
CachedData getCachedData();
/**
* Refreshes and applies any changes to the cached holder data.
*
* @return the task future
* @since 4.0
*/
@Nonnull
CompletableFuture<Void> refreshCachedData();
/**
* Gets the backing multimap containing every permission this holder has.
*
@@ -28,7 +28,6 @@ package me.lucko.luckperms.api;
import me.lucko.luckperms.api.caching.UserData;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@@ -87,15 +86,6 @@ public interface User extends PermissionHolder {
@Override
UserData getCachedData();
/**
* Refreshes and applies any changes to the cached user data.
*
* @return the task future
* @since 4.0
*/
@Nonnull
CompletableFuture<Void> refreshCachedData();
/**
* Refresh and re-assign the users permissions.
*