public class RedisBucket extends Object
| 构造器和说明 |
|---|
RedisBucket(RedisClient client) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
delay(String key,
int inSeconds)
延期
|
Long |
exists(Collection<String> keys)
检查是多个主键是否存在
|
Boolean |
exists(String key)
检查是否存在
|
Long |
existsByPattern(String pattern)
检查一批匹配模式的主键是否存在
|
String |
get(String key)
获取
|
<T> T |
getAndDeserialize(String key)
已过时。
1.5
|
<T> T |
getAndDeserialize(String key,
Class<T> clz)
获取并反序列化
|
List<String> |
getMore(String... keys)
获取更多
|
<T> List<T> |
getMoreAndDeserialize(Class<T> clz,
String... keys)
获取更多并反序列化
|
<T> List<T> |
getMoreAndDeserialize(String... keys)
已过时。
1.6
|
String |
getOrStore(String key,
int inSeconds,
Supplier<String> supplier)
获取或存储
|
<T> T |
getOrStoreAndSerialize(String key,
int inSeconds,
Class<T> clz,
Supplier<T> supplier)
获取或存储并序列化
|
<T> T |
getOrStoreAndSerialize(String key,
int inSeconds,
Supplier<T> supplier)
已过时。
1.5
|
Set<String> |
keys(String pattern)
获取主键
|
Long |
remove(Collection<String> keys)
移除多个主键
|
Boolean |
remove(String key)
移除
|
Long |
removeByPattern(String pattern)
移除一批匹配模式的主键
|
void |
store(String key,
String val)
存储(不设置时间,即为永久)
|
void |
store(String key,
String val,
int inSeconds)
存储
|
void |
storeAndSerialize(String key,
Object obj)
存储并序列化(不设置时间,即为永久)
|
void |
storeAndSerialize(String key,
Object obj,
int inSeconds)
存储并序列化
|
long |
ttl(String key)
获取剩余时间
|
public RedisBucket(RedisClient client)
@Deprecated public <T> T getAndDeserialize(String key)
@Deprecated public <T> List<T> getMoreAndDeserialize(String... keys)
public <T> List<T> getMoreAndDeserialize(Class<T> clz, String... keys)
@Deprecated public <T> T getOrStoreAndSerialize(String key, int inSeconds, Supplier<T> supplier)
public <T> T getOrStoreAndSerialize(String key, int inSeconds, Class<T> clz, Supplier<T> supplier)
public Long exists(Collection<String> keys)
public Long remove(Collection<String> keys)
public void delay(String key, int inSeconds)
public long ttl(String key)
Copyright © 2024. All rights reserved.