public class LockManager
extends java.lang.Object
构造器和说明 |
---|
LockManager() |
限定符和类型 | 方法和说明 |
---|---|
static boolean |
lockAndWait(java.util.ArrayList<java.lang.Object> lockDatas)
一直循环到加锁成功为止
|
static boolean |
lockOnce(java.util.ArrayList<java.lang.Object> lockDatas)
只尝试一次,无论成功都返回
|
static boolean |
releaseDatas(java.util.ArrayList<java.lang.Object> lockEdDatas)
结束数据锁定
|
public static boolean lockOnce(java.util.ArrayList<java.lang.Object> lockDatas)
lockDatas
- 需要加锁数据的数据public static boolean lockAndWait(java.util.ArrayList<java.lang.Object> lockDatas) throws java.lang.Exception
lockDatas
- 需要加锁的数据java.lang.Exception
public static boolean releaseDatas(java.util.ArrayList<java.lang.Object> lockEdDatas)
lockEdDatas
- 需要解锁的数据