This is an automated email from the ASF dual-hosted git repository.
jianglongtao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new d0647713260 Refactor ProcessOperationLockRegistry (#32855)
d0647713260 is described below
commit d06477132607159c59a001a892c38cdc993d5798
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Sep 13 19:36:24 2024 +0800
Refactor ProcessOperationLockRegistry (#32855)
---
.../sql/process/lock/ProcessOperationLockRegistry.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/lock/ProcessOperationLockRegistry.java
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/lock/ProcessOperationLockRegistry.java
index 5fac6e39e5d..ae23e2e50f8 100644
---
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/lock/ProcessOperationLockRegistry.java
+++
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/lock/ProcessOperationLockRegistry.java
@@ -45,29 +45,29 @@ public final class ProcessOperationLockRegistry {
/**
* Wait until release ready.
*
- * @param lockId lock ID
+ * @param processId process ID
* @param releaseStrategy process operation lock release strategy
* @return release ready or not
*/
- public boolean waitUntilReleaseReady(final String lockId, final
ProcessOperationLockReleaseStrategy releaseStrategy) {
+ public boolean waitUntilReleaseReady(final String processId, final
ProcessOperationLockReleaseStrategy releaseStrategy) {
ProcessOperationLock lock = new ProcessOperationLock();
- locks.put(lockId, lock);
+ locks.put(processId, lock);
lock.lock();
try {
return lock.awaitDefaultTime(releaseStrategy);
} finally {
lock.unlock();
- locks.remove(lockId);
+ locks.remove(processId);
}
}
/**
* Notify lock.
*
- * @param lockId lock ID
+ * @param processId process ID
*/
- public void notify(final String lockId) {
- ProcessOperationLock lock = locks.get(lockId);
+ public void notify(final String processId) {
+ ProcessOperationLock lock = locks.get(processId);
if (null != lock) {
lock.doNotify();
}