[FEATURE] Create a Rest Endpoint for findLock method in LockService #313
Labels
CCI
College Contributor Initiative PRs
enhancement
New feature or request
good first issue
Good for newcomers
Is your feature request related to a problem?
LockService has a method named findlock. It does not have a rest end point. Therefore, it is needed to create a rest end point in order to make debugging easier. This method is being heavily used in AcquireLock API and ReleaseLockApi, therefore in case of failure it will be super easy to debug.
What solution would you like?
Create a rest end point in SPI interface of Job Scheduler on path find/lock/{lockId} . Create a class named RestFindLockAction and define suitable extension points in JobScheduler Plugin like GetActions.
Do you have any additional context?
public static final String FIND_LOCK_ACTION = "find_lock_action";
public static final String LOCK_ID = "lock_id";
new Route(GET, String.format(Locale.ROOT, "%s/%s/{%s}", JobSchedulerPlugin.JS_BASE_URI, "_find_lock", LOCK_ID))
a) First fetch lockId from the RestRequest (refer ReleaseLockAction prepare request method)
b) Initialize CompletableFuture object to make the search async
c) Call lockService.findLock (refer ReleaseLockAction prepare request method)
d) Return the channel response with the lockModel object
The text was updated successfully, but these errors were encountered: