本文整理汇总了Java中org.springframework.data.redis.core.BoundHashOperations类的典型用法代码示例。如果您正苦于以下问题:Java BoundHashOperations类的具体用法?Java BoundHashOperations怎么用?Java BoundHashOperations使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BoundHashOperations类属于org.springframework.data.redis.core包,在下文中一共展示了BoundHashOperations类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: removeAll
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
/**
* 清空缓存
*/
@Override
public void removeAll(){
log.debug("@GenericCache remove all cache");
Set<K> keys = getKeyHashOps().keys();
if(keys.size() > 0){
getKeyHashOps().delete(keys.toArray());//删除主键缓存
if(unique != null){ //删除默认唯一键缓存
getUniqueHashOps().delete(getUniqueHashOps().keys().toArray());
}
for(String keyName: customKeys){ //删除自定义字段缓存
BoundHashOperations<String, Object, V> map = customHashOpsHolder.get(keyName);
if(map != null)
map.delete(map.keys().toArray());
}
}
}
开发者ID:simbest,项目名称:simbest-cores,代码行数:22,代码来源:GenericCache.java
示例2: loadByCustom
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
@Override
public V loadByCustom(String keyName, Object keyValue){
if(StringUtils.isNotEmpty(keyName) && keyValue!=null){
V v = null;
BoundHashOperations<String, Object, V> customHashOps = customHashOpsHolder.get(coreConfig.getCtx()+Constants.COLON+clazz.getSimpleName()+Constants.COLON+keyName);
if(customHashOps != null)
v = customHashOps.get(keyValue);
log.debug(String.format("@GenericCache get cache value with custom key name: %s and key value: %s and return value: %s ", keyName, keyValue, v));
return v;
}else{
log.warn(String.format("@GenericCache cant not get cache value with empty keyName %s and empty keyValue %s",keyName,keyValue));
return null;
}
}
开发者ID:simbest,项目名称:simbest-cores,代码行数:15,代码来源:GenericCache.java
示例3: boundHashOps
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
@Override
public <HK, HV> BoundHashOperations<K, HK, HV> boundHashOps(K key) {
try {
return redisTemplate.boundHashOps(key);
} catch (Exception ex) {
throw new RedisBaoException(ex);
}
}
开发者ID:mixaceh,项目名称:openyu-commons,代码行数:9,代码来源:RedisBaoSupporter.java
示例4: getKeyHashOps
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
@Override
public BoundHashOperations<String, K, V> getKeyHashOps() {
return getCacheService().getKeyHashOps();
}
开发者ID:simbest,项目名称:simbest-cores,代码行数:5,代码来源:GenericAdvanceService.java
示例5: getUniqueHashOps
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
@Override
public BoundHashOperations<String, Object, V> getUniqueHashOps() {
return getCacheService().getUniqueHashOps();
}
开发者ID:simbest,项目名称:simbest-cores,代码行数:5,代码来源:GenericAdvanceService.java
示例6: getKeyHashOps
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
/**
* @return the keyHashOps
*/
@Override
public BoundHashOperations<String, K, V> getKeyHashOps() {
return keyHashOps;
}
开发者ID:simbest,项目名称:simbest-cores,代码行数:8,代码来源:GenericCache.java
示例7: setKeyHashOps
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
/**
* @param keyHashOps the keyHashOps to set
*/
public void setKeyHashOps(BoundHashOperations<String, K, V> keyHashOps) {
this.keyHashOps = keyHashOps;
}
开发者ID:simbest,项目名称:simbest-cores,代码行数:7,代码来源:GenericCache.java
示例8: setUniqueHashOps
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
/**
* @param uniqueHashOps the uniqueHashOps to set
*/
public void setUniqueHashOps(
BoundHashOperations<String, Object, V> uniqueHashOps) {
this.uniqueHashOps = uniqueHashOps;
}
开发者ID:simbest,项目名称:simbest-cores,代码行数:8,代码来源:GenericCache.java
示例9: getUniqueHashOps
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
/**
* @return the uniqueHashOps
*/
@Override
public BoundHashOperations<String, Object, V> getUniqueHashOps() {
return uniqueHashOps;
}
开发者ID:simbest,项目名称:simbest-cores,代码行数:8,代码来源:GenericCache.java
示例10: boundHashOps
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
@Override
public <HK, HV> BoundHashOperations<K, HK, HV> boundHashOps(K key) {
throw new MethodNotSupportException("myRedisTemplate not support this method : boundHashOps(K key) , please use opsForXX");
//return new DefaultBoundHashOperations<K, HK, HV>(key, this);
}
开发者ID:mauersu,项目名称:redis-admin,代码行数:6,代码来源:MyRedisTemplate.java
示例11: getHashOps
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
BoundHashOperations<byte[], byte[], Object> getHashOps(Serializable keyspace) {
return redisOps.boundHashOps(converter.getConversionService().convert(keyspace, byte[].class));
}
开发者ID:christophstrobl,项目名称:spring-data-keyvalue-redis,代码行数:4,代码来源:RedisKeyValueAdapter.java
示例12: RedisRequestRepository
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
public RedisRequestRepository(BoundHashOperations<String, String, Request> hashOps) {
this.hashOps = hashOps;
}
开发者ID:trustedanalytics,项目名称:data-acquisition,代码行数:4,代码来源:RedisRequestRepository.java
示例13: getSessionBoundHashOperations
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
/**
* Gets the {@link BoundHashOperations} to operate on a {@link Session}.
* @param sessionId the id of the {@link Session} to work with
* @return the {@link BoundHashOperations} to operate on a {@link Session}
*/
private BoundHashOperations<Object, Object, Object> getSessionBoundHashOperations(
String sessionId) {
String key = getSessionKey(sessionId);
return this.sessionRedisOperations.boundHashOps(key);
}
开发者ID:spring-projects,项目名称:spring-session,代码行数:11,代码来源:RedisOperationsSessionRepository.java
示例14: getKeyHashOps
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
/**
* 获取主键缓存Operations
* @return
*/
BoundHashOperations<String, K, V> getKeyHashOps();
开发者ID:simbest,项目名称:simbest-cores,代码行数:6,代码来源:IGenericCache.java
示例15: getUniqueHashOps
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
/**
* 获取唯一键缓存Operations
* @return
*/
BoundHashOperations<String, Object, V> getUniqueHashOps();
开发者ID:simbest,项目名称:simbest-cores,代码行数:6,代码来源:IGenericCache.java
示例16: hashOps
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
/**
* Return the {@link BoundHashOperations} operation for Redis.
*
* @return {@code BoundHashOperations} for Redis
*/
private BoundHashOperations<String, String, String> hashOps() {
return this.redisOperations.boundHashOps("spring.cloud.resource.uri");
}
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:9,代码来源:RedisUriRegistry.java
示例17: boundHashOps
import org.springframework.data.redis.core.BoundHashOperations; //导入依赖的package包/类
<HK, HV> BoundHashOperations<K, HK, HV> boundHashOps(K key);
开发者ID:mixaceh,项目名称:openyu-commons,代码行数:2,代码来源:RedisBao.java
注:本文中的org.springframework.data.redis.core.BoundHashOperations类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论