Package cn.sliew.milky.common.concurrent
Class ReleasableLock
- java.lang.Object
-
- cn.sliew.milky.common.concurrent.ReleasableLock
-
- All Implemented Interfaces:
Releasable,Closeable,AutoCloseable
public class ReleasableLock extends Object implements Releasable
Releasable lock used inside of Engine implementations
-
-
Constructor Summary
Constructors Constructor Description ReleasableLock(Lock lock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReleasableLockacquire()voidclose()booleanisHeldByCurrentThread()
-
-
-
Constructor Detail
-
ReleasableLock
public ReleasableLock(Lock lock)
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceReleasable
-
acquire
public ReleasableLock acquire() throws BizException
- Throws:
BizException
-
isHeldByCurrentThread
public boolean isHeldByCurrentThread()
-
-