com.github.wzc789376152.springboot.config.redis.IRedisService Maven / Gradle / Ivy
The newest version!
package com.github.wzc789376152.springboot.config.redis;
import org.springframework.data.redis.core.BoundSetOperations;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
public interface IRedisService {
void setCacheObject(final String key, final T value);
void setCacheObject(final String key, final T value, final Long timeout, final TimeUnit timeUnit);
Boolean setNx(final String key, final T value, final Long timeout, final TimeUnit timeUnit);
boolean expire(final String key, final long timeout);
boolean expire(final String key, final long timeout, final TimeUnit unit);
long getExpire(final String key);
Boolean hasKey(String key);
T getCacheObject(final String key);
T getCacheObject(final String key, Class tClass);
List getCacheObjectList(final String key, Class tClass);
boolean deleteObject(final String key);
long deleteObject(final Collection collection);
long setCacheList(final String key, final List dataList);
List getCacheList(final String key);
List getCacheList(final String key, Class tClass);
long removeCacheList(final String key, final List dataList);
long removeCacheList(final String key, final T value);
BoundSetOperations setCacheSet(final String key, final Set dataSet);
Set getCacheSet(final String key);
Set getCacheSet(final String key, Class tClass);
long removeCacheSet(final String key, final T data);
long removeCacheSet(final String key, final Set dataSet);
void setCacheMap(final String key, final Map dataMap);
Map getCacheMap(final String key);
Map getCacheMap(final String key, Class tClass);
long removeCacheMap(final String key, Map dataMap);
long removeCacheMap(final String key, final String mapKey);
void setCacheMapValue(final String key, final String hKey, final T value);
T getCacheMapValue(final String key, final String hKey);
T getCacheMapValue(final String key, final String hKey,Class tClass);
List getMultiCacheMapValue(final String key, final Collection