Class AbstractRoleMapperClearRealmCache

java.lang.Object
org.elasticsearch.xpack.security.authc.support.mapper.AbstractRoleMapperClearRealmCache
All Implemented Interfaces:
UserRoleMapper
Direct Known Subclasses:
ClusterStateRoleMapper, DnRoleMapper, NativeRoleMappingStore

public abstract class AbstractRoleMapperClearRealmCache extends Object implements UserRoleMapper
This is the base class for UserRoleMapper implementations that need to notify registered CachingRealms, when the role mapping rules change, to invalidate their caches that could rely on the obsolete role mapping rules.
  • Constructor Details

    • AbstractRoleMapperClearRealmCache

      public AbstractRoleMapperClearRealmCache()
  • Method Details

    • clearRealmCacheOnChange

      public void clearRealmCacheOnChange(CachingRealm realm)
      Indicates that the provided realm should have its cache cleared if this store is updated.
      Specified by:
      clearRealmCacheOnChange in interface UserRoleMapper
      See Also:
    • clearRealmCachesOnAllNodes

      protected void clearRealmCachesOnAllNodes(Client client, ActionListener<Void> listener)
      UserRoleMapper implementations should be calling this method after role mappings changed, in order to clear realm caches across the cluster.
    • clearRealmCachesOnLocalNode

      public void clearRealmCachesOnLocalNode()
      UserRoleMapper implementations should be calling this method after role mappings changed, in order to clear realm caches on the local node only.