Class HolderCachedDataManager<T extends PermissionHolder>
java.lang.Object
me.lucko.luckperms.common.cacheddata.AbstractCachedDataManager
me.lucko.luckperms.common.cacheddata.HolderCachedDataManager<T>
- All Implemented Interfaces:
net.luckperms.api.cacheddata.CachedDataManager
- Direct Known Subclasses:
GroupCachedDataManager, UserCachedDataManager
public abstract class HolderCachedDataManager<T extends PermissionHolder>
extends AbstractCachedDataManager
Holds an easily accessible cache of a holders data in a number of contexts
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.luckperms.api.cacheddata.CachedDataManager
net.luckperms.api.cacheddata.CachedDataManager.Container<T> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CalculatorFactoryGets theCalculatorFactoryused to buildPermissionCalculators.protected net.luckperms.api.metastacking.MetaStackDefinitiongetDefaultMetaStackDefinition(net.luckperms.api.node.ChatMetaType type) Gets the defaultMetaStackDefinitionfor use if one wasn't specifically provided.protected net.luckperms.api.query.QueryOptionsGets the most appropriate active query options instance for the holder.protected voidresolveMeta(MetaAccumulator accumulator, net.luckperms.api.query.QueryOptions queryOptions) Resolves the owners meta data for the givenQueryOptions.resolvePermissions(IntFunction<M> mapFactory, net.luckperms.api.query.QueryOptions queryOptions) Resolves the owners permissions data for the givenQueryOptions.Methods inherited from class AbstractCachedDataManager
getMetaData, getMetaData, getMetadataForQueryOptions, getPermissionData, getPermissionData, getPlugin, invalidate, invalidatePermissionCalculators, metaData, performCacheCleanup, permissionData
-
Field Details
-
holder
The holder whom this data instance is representing
-
-
Constructor Details
-
HolderCachedDataManager
-
-
Method Details
-
getQueryOptions
protected net.luckperms.api.query.QueryOptions getQueryOptions()Description copied from class:AbstractCachedDataManagerGets the most appropriate active query options instance for the holder.- Specified by:
getQueryOptionsin classAbstractCachedDataManager- Returns:
- the query options
-
getCalculatorFactory
Description copied from class:AbstractCachedDataManagerGets theCalculatorFactoryused to buildPermissionCalculators.- Specified by:
getCalculatorFactoryin classAbstractCachedDataManager- Returns:
- the calculator factory
-
getDefaultMetaStackDefinition
protected net.luckperms.api.metastacking.MetaStackDefinition getDefaultMetaStackDefinition(net.luckperms.api.node.ChatMetaType type) Description copied from class:AbstractCachedDataManagerGets the defaultMetaStackDefinitionfor use if one wasn't specifically provided.- Specified by:
getDefaultMetaStackDefinitionin classAbstractCachedDataManager- Parameters:
type- the type of meta stack- Returns:
- a meta stack definition instance
-
resolvePermissions
protected <M extends Map<String, net.luckperms.api.node.Node>> M resolvePermissions(IntFunction<M> mapFactory, net.luckperms.api.query.QueryOptions queryOptions) Description copied from class:AbstractCachedDataManagerResolves the owners permissions data for the givenQueryOptions.- Specified by:
resolvePermissionsin classAbstractCachedDataManager- Type Parameters:
M- the map type- Parameters:
mapFactory- a function to create a map instance to return the results inqueryOptions- the query options- Returns:
- the resolved permissions
-
resolveMeta
protected void resolveMeta(MetaAccumulator accumulator, net.luckperms.api.query.QueryOptions queryOptions) Description copied from class:AbstractCachedDataManagerResolves the owners meta data for the givenQueryOptions.- Specified by:
resolveMetain classAbstractCachedDataManager- Parameters:
accumulator- the accumulator to add resolved meta toqueryOptions- the query options
-