Record Class RedisLoadWithLock<T>
java.lang.Object
java.lang.Record
com.codeupsoft.component.redis.client.RedisLoadWithLock<T>
- Type Parameters:
T- 缓存数据类型
Redis带锁缓存加载器.
- Author:
- Liu,Dongdong
-
Constructor Summary
ConstructorsConstructorDescriptionRedisLoadWithLock(RedisCacheData<T> cacheData, Long lockerExpire) Creates an instance of aRedisLoadWithLockrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecacheDatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelockerExpirerecord component.static <T> RedisLoadWithLock<T> of(RedisCacheData<T> cacheData) 创建Redis带锁缓存加载器实例(使用默认锁过期时间).static <T> RedisLoadWithLock<T> of(RedisCacheData<T> cacheData, long lockerExpire, TimeUnit timeUnit) 创建Redis带锁缓存加载器实例(指定锁过期时间).final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RedisLoadWithLock
Creates an instance of aRedisLoadWithLockrecord class.- Parameters:
cacheData- the value for thecacheDatarecord componentlockerExpire- the value for thelockerExpirerecord component
-
-
Method Details
-
of
创建Redis带锁缓存加载器实例(使用默认锁过期时间).- Type Parameters:
T- 缓存数据类型- Parameters:
cacheData- 缓存数据- Returns:
- Redis带锁缓存加载器实例
-
of
public static <T> RedisLoadWithLock<T> of(RedisCacheData<T> cacheData, long lockerExpire, TimeUnit timeUnit) 创建Redis带锁缓存加载器实例(指定锁过期时间).- Type Parameters:
T- 缓存数据类型- Parameters:
cacheData- 缓存数据lockerExpire- 锁过期时间timeUnit- 时间单位- Returns:
- Redis带锁缓存加载器实例
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
cacheData
Returns the value of thecacheDatarecord component.- Returns:
- the value of the
cacheDatarecord component
-
lockerExpire
Returns the value of thelockerExpirerecord component.- Returns:
- the value of the
lockerExpirerecord component
-