Skip to content

Commit

Permalink
improve comment
Browse files Browse the repository at this point in the history
Signed-off-by: Kaituo Li <[email protected]>
  • Loading branch information
kaituo committed Jul 21, 2023
1 parent d77fae9 commit 9dddaa5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main/java/org/opensearch/timeseries/util/ParseUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,15 @@ public static <ConfigType extends Config> void getConfig(
}

/**
* This method processes the GetResponse and applies the consumer function if the user has permissions
* or if the filterByBackendRole is disabled. It uses a ConfigFactory to parse the correct type of Config.
* Processes a GetResponse by leveraging the factory method Config.parseConfig to
* appropriately parse the specified type of Config. The execution of the provided
* consumer function depends on the state of the 'filterByBackendRole' setting:
*
* - If 'filterByBackendRole' is disabled, the consumer function will be invoked
* irrespective of the user's permissions.
*
* - If 'filterByBackendRole' is enabled, the consumer function will only be invoked
* provided the user holds the requisite permissions.
*
* @param <ConfigType> The type of Config to be processed in this method, which extends from the Config base type.
* @param response The GetResponse from the getConfig request. This contains the information about the config that is to be processed.
Expand Down

0 comments on commit 9dddaa5

Please sign in to comment.