public interface LockTemplate<L extends Lock>
| 限定符和类型 | 方法和说明 |
|---|---|
void |
execute(Runnable runnable,
L lock) |
void |
execute(Runnable runnable,
long waitTime,
L lock) |
void |
execute(Runnable runnable,
long waitTime,
long leaseTime,
L lock) |
<R> R |
execute(Runnable runnable,
R result,
L lock) |
<R> R |
execute(Runnable runnable,
R result,
long waitTime,
L lock) |
<R> R |
execute(Runnable runnable,
R result,
long waitTime,
long leaseTime,
L lock) |
L |
get(String... key) |
L |
get(String key) |
void |
lock(L lock) |
long |
remove(String... key) |
boolean |
remove(String key) |
<T> Future<T> |
submit(Runnable runnable,
T result,
L lock) |
<T> Future<T> |
submit(Runnable runnable,
T result,
long waitTime,
L lock) |
<T> Future<T> |
submit(Runnable runnable,
T result,
long waitTime,
long leaseTime,
L lock) |
boolean |
tryLock(L lock) |
boolean |
tryLock(L lock,
long waitTime) |
boolean |
tryLock(L lock,
long waitTime,
long leaseTime) |
void |
unlock(L lock) |
void lock(L lock)
boolean tryLock(L lock)
void unlock(L lock)
boolean remove(String key)
long remove(String... key)
void execute(Runnable runnable, long waitTime, long leaseTime, L lock) throws Exception
Exception<R> R execute(Runnable runnable, R result, long waitTime, L lock) throws Exception
Exception<R> R execute(Runnable runnable, R result, long waitTime, long leaseTime, L lock) throws Exception
Exception<T> Future<T> submit(Runnable runnable, T result, long waitTime, L lock) throws Exception
ExceptionCopyright © 2023. All rights reserved.