public static final class PermissionRegistry.Implementation extends Object implements PermissionRegistry
PermissionRegistry
default implementation that synchronizes on a provided lock instance for
accessing the internal registry in order to avoid concurrency issues while the internal datastructure is
rebuilt.PermissionRegistry.Implementation
Modifier and Type | Method and Description |
---|---|
Object |
lockPermissionRegistry()
Returns the lock instance that is internally used by this registry instance.
|
Permission |
permission(Resource resource,
Integer factor)
Looks up the
Permission instance representing the passed Resource instance with the passed
factor value. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
New, New, New, New, permission
public final Permission permission(Resource resource, Integer factor)
Permission
instance representing the passed Resource
instance with the passed
factor value. If no suitable Permission
instance can be found, null is returned.permission
in interface PermissionRegistry
resource
- the Resource
instance for which the associated Permission
instance shall be
returned.factor
- the factor value of the Resource
instance for which the associated Permission
instance shall be returned.Permission
instance specified by the passed values.public final Object lockPermissionRegistry()
lockPermissionRegistry
in interface PermissionRegistry