use of com.facebook.presto.spi.security.SystemAccessControl in project presto by prestodb.
the class AccessControlManager method setSystemAccessControl.
@VisibleForTesting
protected void setSystemAccessControl(String name, Map<String, String> properties) {
requireNonNull(name, "name is null");
requireNonNull(properties, "properties is null");
checkState(systemAccessControlLoading.compareAndSet(false, true), "System access control already initialized");
log.info("-- Loading system access control --");
SystemAccessControlFactory systemAccessControlFactory = systemAccessControlFactories.get(name);
checkState(systemAccessControlFactory != null, "Access control %s is not registered", name);
SystemAccessControl systemAccessControl = systemAccessControlFactory.create(ImmutableMap.copyOf(properties));
this.systemAccessControl.set(systemAccessControl);
log.info("-- Loaded system access control %s --", name);
}
Aggregations