public class RedisResource extends KeyValueResource
parent, path, readonly, separator| 构造器和说明 |
|---|
RedisResource(org.springframework.data.redis.core.StringRedisTemplate redisTemplate,
String path,
boolean readonly) |
RedisResource(org.springframework.data.redis.core.StringRedisTemplate redisTemplate,
String path,
boolean readonly,
RedisResource parent) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected boolean |
deleteByKey(String key) |
boolean |
exists()
判断是否存在
|
protected Set<String> |
keys()
该资源下的keys
|
protected Function<String,Resource> |
mappedFunction()
mapped函数,用于根据路径创建资源对象
|
byte[] |
read()
读取
|
void |
readAll()
读取当前资源下的所有内容,主要是缓存作用。
|
protected boolean |
renameTo(Map<String,String> renameKeys)
需要做修改的key,原key: 新key
|
String |
toString() |
boolean |
write(String content)
写入
|
delete, dirs, files, getAbsolutePath, getDirectory, getFilePath, getResource, isDirectory, mkdir, name, parent, readonly, renameTo, resources, separator, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitexport, processExportpublic RedisResource(org.springframework.data.redis.core.StringRedisTemplate redisTemplate,
String path,
boolean readonly,
RedisResource parent)
public RedisResource(org.springframework.data.redis.core.StringRedisTemplate redisTemplate,
String path,
boolean readonly)
public void readAll()
Resourcepublic byte[] read()
Resourceprotected boolean renameTo(Map<String,String> renameKeys)
KeyValueResourcerenameTo 在类中 KeyValueResourcerenameKeys - 需重命名的keypublic boolean exists()
Resourceprotected boolean deleteByKey(String key)
deleteByKey 在类中 KeyValueResourceprotected Function<String,Resource> mappedFunction()
KeyValueResourcemappedFunction 在类中 KeyValueResourceprotected Set<String> keys()
KeyValueResourcekeys 在类中 KeyValueResourceCopyright © 2020–2021. All rights reserved.