cn.cheny.toolbox.redis.client.spring.AbstractMapRedisClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of toolbox Show documentation
Show all versions of toolbox Show documentation
A personal java tool package project
package cn.cheny.toolbox.redis.client.spring;
import cn.cheny.toolbox.redis.client.MapRedisApi;
import java.util.List;
import java.util.Map;
/**
* @author cheney
*/
public abstract class AbstractMapRedisClient extends AbstractRedisClient implements MapRedisApi {
@Override
public void hSetMap(String k, Map kv, int days) {
hSetMap(k, kv);
expire(k, days);
}
@Override
public void hSetMap(String k, Map kv) {
getHashOperationForMap().putAll(k, kv);
}
@Override
public void hSet(String k, String hk, V v) {
getHashOperationForMap().put(k, hk, v);
}
@Override
public V hGet(String k, String hk) {
return getHashOperationForMap().get(k, hk);
}
@Override
public Map hGetMap(String k) {
return getHashOperationForMap().entries(k);
}
@Override
public long hLen(String key) {
return getHashOperationForMap().size(key);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy