Interface CachedDataManager
-
public interface CachedDataManagerHolds cached permission and meta lookup data for aPermissionHolder.All calls will account for inheritance, as well as any default data provided by the platform. This calls are heavily cached and are therefore fast.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceCachedDataManager.Container<T extends CachedData>Manages a specific type ofcached datawithin aCachedDataManagerinstance.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NonNull CachedMetaDatagetMetaData()Gets MetaData from the cache, using the most appropriate query options available at the time.@NonNull CachedMetaDatagetMetaData(@NonNull QueryOptions queryOptions)Gets MetaData from the cache, using the given query options.@NonNull CachedPermissionDatagetPermissionData()Gets PermissionData from the cache, using the most appropriate query options available at the time.@NonNull CachedPermissionDatagetPermissionData(@NonNull QueryOptions queryOptions)Gets PermissionData from the cache, using the given query options.voidinvalidate()Invalidates all cachedCachedPermissionDataandCachedMetaDatainstances.voidinvalidatePermissionCalculators()Invalidates all of the underlying Permission calculators.@NonNull CachedDataManager.Container<CachedMetaData>metaData()Gets the manager forCachedMetaData.@NonNull CachedDataManager.Container<CachedPermissionData>permissionData()Gets the manager forCachedPermissionData.
-
-
-
Method Detail
-
permissionData
@NonNull CachedDataManager.Container<CachedPermissionData> permissionData()
Gets the manager forCachedPermissionData.- Returns:
- the permission data manager
-
metaData
@NonNull CachedDataManager.Container<CachedMetaData> metaData()
Gets the manager forCachedMetaData.- Returns:
- the meta data manager
-
getPermissionData
@NonNull CachedPermissionData getPermissionData(@NonNull QueryOptions queryOptions)
Gets PermissionData from the cache, using the given query options.- Parameters:
queryOptions- the query options- Returns:
- a permission data instance
-
getMetaData
@NonNull CachedMetaData getMetaData(@NonNull QueryOptions queryOptions)
Gets MetaData from the cache, using the given query options.- Parameters:
queryOptions- the query options- Returns:
- a meta data instance
-
getPermissionData
@NonNull CachedPermissionData getPermissionData()
Gets PermissionData from the cache, using the most appropriate query options available at the time.For
Users, the most appropriate query options will be theircurrent active query optionsif the corresponding player is online, and otherwise, will fallback tothe current static query optionsif they are offline.For
Groups, the most appropriate query options will always beContextManager.getStaticQueryOptions()the current static query options.- Returns:
- a permission data instance
- Since:
- 5.1
-
getMetaData
@NonNull CachedMetaData getMetaData()
Gets MetaData from the cache, using the most appropriate query options available at the time.For
Users, the most appropriate query options will be theircurrent active query optionsif the corresponding player is online, and otherwise, will fallback tothe current static query optionsif they are offline.For
Groups, the most appropriate query options will always beContextManager.getStaticQueryOptions()the current static query options.- Returns:
- a meta data instance
- Since:
- 5.1
- See Also:
PermissionHolder.getQueryOptions()
-
invalidate
void invalidate()
Invalidates all cachedCachedPermissionDataandCachedMetaDatainstances.
-
invalidatePermissionCalculators
void invalidatePermissionCalculators()
Invalidates all of the underlying Permission calculators.Can be called to allow for an update in defaults.
-
-