public interface ShardingSphereLock
| 限定符和类型 | 方法和说明 |
|---|---|
long |
getDefaultTimeOut()
Get default lock time out milliseconds.
|
boolean |
isLocked(String lockName)
Check whether resource is locked in current instance.
|
void |
releaseLock(String lockName)
Release lock.
|
boolean |
tryLock(String lockName)
Try to lock.
|
boolean |
tryLock(String lockName,
long timeout)
Try to lock with time out.
|
boolean tryLock(String lockName)
lockName - lock nameboolean tryLock(String lockName, long timeout)
lockName - lock nametimeout - the maximum time in milliseconds to acquire lockvoid releaseLock(String lockName)
lockName - lock nameboolean isLocked(String lockName)
lockName - lock namelong getDefaultTimeOut()
Copyright © 2021 The Apache Software Foundation. All rights reserved.