public class ReentrantLockTemplate extends Object implements LockTemplate<ReentrantLock>
| 限定符和类型 | 方法和说明 |
|---|---|
void |
execute(Runnable runnable,
long waitTime,
long leaseTime,
ReentrantLock lock) |
void |
execute(Runnable runnable,
long waitTime,
ReentrantLock lock) |
void |
execute(Runnable runnable,
ReentrantLock lock) |
<R> R |
execute(Runnable runnable,
R result,
long waitTime,
long leaseTime,
ReentrantLock lock) |
<R> R |
execute(Runnable runnable,
R result,
long waitTime,
ReentrantLock lock) |
<R> R |
execute(Runnable runnable,
R result,
ReentrantLock lock) |
ReentrantLock |
get(String... key) |
ReentrantLock |
get(String key) |
void |
lock(ReentrantLock lock) |
static ReentrantLockTemplate |
me() |
long |
remove(String... key) |
boolean |
remove(String key) |
<T> Future<T> |
submit(Runnable runnable,
T result,
long waitTime,
long leaseTime,
ReentrantLock lock) |
<T> Future<T> |
submit(Runnable runnable,
T result,
long waitTime,
ReentrantLock lock) |
<T> Future<T> |
submit(Runnable runnable,
T result,
ReentrantLock lock) |
boolean |
tryLock(ReentrantLock lock) |
boolean |
tryLock(ReentrantLock lock,
long waitTime) |
boolean |
tryLock(ReentrantLock lock,
long waitTime,
long leaseTime) |
void |
unlock(ReentrantLock lock) |
public ReentrantLock get(String key)
get 在接口中 LockTemplate<ReentrantLock>public ReentrantLock get(String... key)
get 在接口中 LockTemplate<ReentrantLock>public void lock(ReentrantLock lock)
lock 在接口中 LockTemplate<ReentrantLock>public boolean tryLock(ReentrantLock lock)
tryLock 在接口中 LockTemplate<ReentrantLock>public boolean tryLock(ReentrantLock lock, long waitTime) throws InterruptedException
tryLock 在接口中 LockTemplate<ReentrantLock>InterruptedExceptionpublic boolean tryLock(ReentrantLock lock, long waitTime, long leaseTime)
tryLock 在接口中 LockTemplate<ReentrantLock>public void unlock(ReentrantLock lock)
unlock 在接口中 LockTemplate<ReentrantLock>public boolean remove(String key)
remove 在接口中 LockTemplate<ReentrantLock>public long remove(String... key)
remove 在接口中 LockTemplate<ReentrantLock>public void execute(Runnable runnable, ReentrantLock lock)
execute 在接口中 LockTemplate<ReentrantLock>public void execute(Runnable runnable, long waitTime, ReentrantLock lock) throws Exception
execute 在接口中 LockTemplate<ReentrantLock>Exceptionpublic void execute(Runnable runnable, long waitTime, long leaseTime, ReentrantLock lock) throws Exception
execute 在接口中 LockTemplate<ReentrantLock>Exceptionpublic <R> R execute(Runnable runnable, R result, ReentrantLock lock) throws Exception
execute 在接口中 LockTemplate<ReentrantLock>Exceptionpublic <R> R execute(Runnable runnable, R result, long waitTime, ReentrantLock lock) throws Exception
execute 在接口中 LockTemplate<ReentrantLock>Exceptionpublic <R> R execute(Runnable runnable, R result, long waitTime, long leaseTime, ReentrantLock lock) throws Exception
execute 在接口中 LockTemplate<ReentrantLock>Exceptionpublic <T> Future<T> submit(Runnable runnable, T result, ReentrantLock lock)
submit 在接口中 LockTemplate<ReentrantLock>public <T> Future<T> submit(Runnable runnable, T result, long waitTime, ReentrantLock lock) throws Exception
submit 在接口中 LockTemplate<ReentrantLock>Exceptionpublic <T> Future<T> submit(Runnable runnable, T result, long waitTime, long leaseTime, ReentrantLock lock) throws Exception
submit 在接口中 LockTemplate<ReentrantLock>Exceptionpublic static ReentrantLockTemplate me()
Copyright © 2023. All rights reserved.