Class ConfigurationRoleStore

java.lang.Object
org.gridgain.internal.rbac.roles.ConfigurationRoleStore
All Implemented Interfaces:
RoleStore, Store<org.gridgain.internal.rbac.roles.Role>

public class ConfigurationRoleStore extends Object implements RoleStore
Role store implementation based on distributed configuration AuthorizationConfiguration.
  • Constructor Details

    • ConfigurationRoleStore

      public ConfigurationRoleStore(org.gridgain.internal.rbac.configuration.AuthorizationConfiguration authorizationConfiguration)
      Constructor.
      Parameters:
      authorizationConfiguration - Authorization configuration.
  • Method Details

    • putIfNotExists

      public CompletableFuture<OperationResult> putIfNotExists(LowerCaseString roleName, org.gridgain.internal.rbac.roles.Role role)
      Description copied from interface: Store
      Puts entry if given key does not exist.
      Specified by:
      putIfNotExists in interface Store<org.gridgain.internal.rbac.roles.Role>
      Parameters:
      roleName - Entry key.
      role - Entry value.
      Returns:
      Operation result.
    • updateIfExists

      public CompletableFuture<OperationResult> updateIfExists(LowerCaseString roleName, Function<org.gridgain.internal.rbac.roles.Role,org.gridgain.internal.rbac.roles.Role> update)
      Description copied from interface: Store
      Updates entry if given key exists.
      Specified by:
      updateIfExists in interface Store<org.gridgain.internal.rbac.roles.Role>
      Parameters:
      roleName - Entry key.
      update - Update entry function.
      Returns:
      Operation result.
    • removeIfExists

      public CompletableFuture<OperationResult> removeIfExists(LowerCaseString roleName)
      Description copied from interface: Store
      Removes entry if given key exists.
      Specified by:
      removeIfExists in interface Store<org.gridgain.internal.rbac.roles.Role>
      Parameters:
      roleName - Entry key.
      Returns:
      Operation result.
    • getAll

      public Collection<org.gridgain.internal.rbac.roles.Role> getAll()
      Description copied from interface: Store
      Gets all entries. If there is no entries at all, empty collection will be returned.
      Specified by:
      getAll in interface Store<org.gridgain.internal.rbac.roles.Role>
      Returns:
      Collection of entries.
    • getAllWithKeys

      public Map<LowerCaseString,org.gridgain.internal.rbac.roles.Role> getAllWithKeys()
      Description copied from interface: Store
      Gets all entries with keys. If there is no entries at all, empty map will be returned.
      Specified by:
      getAllWithKeys in interface Store<org.gridgain.internal.rbac.roles.Role>
      Returns:
      Map from entry key to entry.
    • get

      @Nullable public @Nullable org.gridgain.internal.rbac.roles.Role get(LowerCaseString roleName)
      Description copied from interface: Store
      Gets entry by key.
      Specified by:
      get in interface Store<org.gridgain.internal.rbac.roles.Role>
      Parameters:
      roleName - Entry key.
      Returns:
      Entry value or null if entry with given key does not exist.
    • get

      public List<org.gridgain.internal.rbac.roles.Role> get(LowerCaseString... keys)
      Description copied from interface: Store
      Get entries by keys.
      Specified by:
      get in interface Store<org.gridgain.internal.rbac.roles.Role>
      Parameters:
      keys - Entry keys.
      Returns:
      List of corresponding entries. List contains null if entry with given key does not exist