Search in sources :

Example 1 with GlobalSecurityManager

use of org.infinispan.security.GlobalSecurityManager in project infinispan by infinispan.

the class GlobalSecurityManagerImpl method flushGlobalACLCache.

@ManagedOperation(name = "Flush ACL Cache", displayName = "Flush ACL Cache", description = "Flushes the global ACL cache across the entire cluster")
@Override
public CompletionStage<Void> flushGlobalACLCache() {
    if (cacheEnabled) {
        ClusterExecutor executor = SecurityActions.getClusterExecutor(embeddedCacheManager);
        return executor.submitConsumer(cm -> {
            GlobalSecurityManager globalSecurityManager = SecurityActions.getGlobalComponentRegistry(cm).getComponent(GlobalSecurityManager.class);
            ((GlobalSecurityManagerImpl) globalSecurityManager).flushGlobalACLCache0();
            return null;
        }, (a, v, t) -> {
        });
    } else {
        return CompletableFutures.completedNull();
    }
}
Also used : GlobalSecurityManager(org.infinispan.security.GlobalSecurityManager) ClusterExecutor(org.infinispan.manager.ClusterExecutor) ManagedOperation(org.infinispan.jmx.annotations.ManagedOperation)

Aggregations

ManagedOperation (org.infinispan.jmx.annotations.ManagedOperation)1 ClusterExecutor (org.infinispan.manager.ClusterExecutor)1 GlobalSecurityManager (org.infinispan.security.GlobalSecurityManager)1