@Ignored public interface ICacheLocker
Modifier and Type | Method and Description |
---|---|
void |
readLock(Object key)
设置读锁
|
void |
releaseReadLock(Object key)
释放读锁
|
void |
releaseWriteLock(Object key)
释放写锁
|
boolean |
tryReadLock(Object key,
long timeout)
尝试设置读锁,等待timeout毫秒时间
|
boolean |
tryWriteLock(Object key,
long timeout)
尝试设置写锁,等待timeout毫秒时间
|
void |
writeLock(Object key)
设置写锁
|
void readLock(Object key)
key
- 缓存锁Key值void writeLock(Object key)
key
- 缓存锁Key值boolean tryReadLock(Object key, long timeout) throws CacheException
key
- 缓存锁Key值timeout
- 超时时间(毫秒)CacheException
- 可能产生缓存异常boolean tryWriteLock(Object key, long timeout) throws CacheException
key
- 缓存锁Key值timeout
- 超时时间(毫秒)CacheException
- 可能产生缓存异常void releaseReadLock(Object key)
key
- 缓存锁Key值void releaseWriteLock(Object key)
key
- 缓存锁Key值Copyright © 2022. All rights reserved.