mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 18:46:36 +08:00
commit:同步1.3版本
This commit is contained in:
@@ -31,27 +31,27 @@ public class RedisDictionaryCache<K, V> implements DictionaryCache<K, V> {
|
||||
/**
|
||||
* redisson客户端。
|
||||
*/
|
||||
protected RedissonClient redissonClient;
|
||||
protected final RedissonClient redissonClient;
|
||||
/**
|
||||
* 数据存储对象。
|
||||
*/
|
||||
protected RMap<K, String> dataMap;
|
||||
protected final RMap<K, String> dataMap;
|
||||
/**
|
||||
* 字典值对象类型。
|
||||
*/
|
||||
protected Class<V> valueClazz;
|
||||
protected final Class<V> valueClazz;
|
||||
/**
|
||||
* 由于大部分场景是读取操作,所以使用读写锁提高并发的伸缩性。
|
||||
*/
|
||||
protected ReadWriteLock lock;
|
||||
protected final ReadWriteLock lock;
|
||||
/**
|
||||
* 获取字典主键数据的函数对象。
|
||||
*/
|
||||
protected final Function<V, K> idGetter;
|
||||
/**
|
||||
* 超时时长。单位毫秒。
|
||||
*/
|
||||
protected static final long TIMEOUT = 2000L;
|
||||
/**
|
||||
* 获取字典主键数据的函数对象。
|
||||
*/
|
||||
protected Function<V, K> idGetter;
|
||||
|
||||
/**
|
||||
* 当前对象的构造器函数。
|
||||
|
||||
@@ -29,11 +29,11 @@ public class RedisTreeDictionaryCache<K, V> extends RedisDictionaryCache<K, V> {
|
||||
/**
|
||||
* 树形数据存储对象。
|
||||
*/
|
||||
private RListMultimap<K, String> allTreeMap;
|
||||
private final RListMultimap<K, String> allTreeMap;
|
||||
/**
|
||||
* 获取字典父主键数据的函数对象。
|
||||
*/
|
||||
protected Function<V, K> parentIdGetter;
|
||||
protected final Function<V, K> parentIdGetter;
|
||||
|
||||
/**
|
||||
* 当前对象的构造器函数。
|
||||
|
||||
Reference in New Issue
Block a user