Class InMemoryMultiTenantAccessController
java.lang.Object
org.apache.hadoop.ozone.om.multitenant.InMemoryMultiTenantAccessController
- All Implemented Interfaces:
MultiTenantAccessController
public class InMemoryMultiTenantAccessController
extends Object
implements MultiTenantAccessController
In Memory version of MultiTenantAccessController.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.ozone.om.multitenant.MultiTenantAccessController
MultiTenantAccessController.Acl, MultiTenantAccessController.Policy, MultiTenantAccessController.Role -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis operation will fail if a policy with the same name already exists, or a policy for the same set of resources already exists.This operation will fail if a role with the same name already exists.voiddeletePolicy(String policyName) voiddeleteRole(String roleName) getLabeledPolicies(String label) longupdateRole(long roleId, MultiTenantAccessController.Role role) Replaces the role given byroleIdwith the contents ofrole.
-
Constructor Details
-
InMemoryMultiTenantAccessController
public InMemoryMultiTenantAccessController()
-
-
Method Details
-
createPolicy
public MultiTenantAccessController.Policy createPolicy(MultiTenantAccessController.Policy policy) throws IOException Description copied from interface:MultiTenantAccessControllerThis operation will fail if a policy with the same name already exists, or a policy for the same set of resources already exists. Roles defined in this policy that do not already exist will be created.- Specified by:
createPolicyin interfaceMultiTenantAccessController- Throws:
IOException
-
getPolicy
- Specified by:
getPolicyin interfaceMultiTenantAccessController- Throws:
IOException
-
getLabeledPolicies
- Specified by:
getLabeledPoliciesin interfaceMultiTenantAccessController- Throws:
IOException
-
updatePolicy
public MultiTenantAccessController.Policy updatePolicy(MultiTenantAccessController.Policy policy) throws IOException - Specified by:
updatePolicyin interfaceMultiTenantAccessController- Throws:
IOException
-
deletePolicy
- Specified by:
deletePolicyin interfaceMultiTenantAccessController- Throws:
IOException
-
createRole
public MultiTenantAccessController.Role createRole(MultiTenantAccessController.Role role) throws IOException Description copied from interface:MultiTenantAccessControllerThis operation will fail if a role with the same name already exists.- Specified by:
createRolein interfaceMultiTenantAccessController- Returns:
- Role ID returned from remote server.
- Throws:
IOException
-
getRole
- Specified by:
getRolein interfaceMultiTenantAccessController- Throws:
IOException
-
updateRole
public MultiTenantAccessController.Role updateRole(long roleId, MultiTenantAccessController.Role role) throws IOException Description copied from interface:MultiTenantAccessControllerReplaces the role given byroleIdwith the contents ofrole. IfroleIddoes not correspond to a role, an exception is thrown. The roleId of a given role can be retrieved from thegetRolemethod.- Specified by:
updateRolein interfaceMultiTenantAccessController- Throws:
IOException
-
deleteRole
- Specified by:
deleteRolein interfaceMultiTenantAccessController- Throws:
IOException
-
getRangerServicePolicyVersion
public long getRangerServicePolicyVersion()- Specified by:
getRangerServicePolicyVersionin interfaceMultiTenantAccessController
-