package com.gyee.alarm.util.redis;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface RedisService {


    /**
     * set存数据
     * @param key
     * @param value
     * @return
     */
    boolean set(String key, String value);



    /**
     * get获取数据
     * @param key
     * @return
     */
    String get(String key);

//    void getList(String key,int start,int end);

    /**
     * 设置有效天数
     * @param key
     * @param expire
     * @return
     */
    boolean expire(String key, long expire);

    /**
     * 移除数据
     * @param key
     * @return
     */
    boolean remove(String key);


    /**
     * 插入对象
     */
    void setObject(Object o);


    boolean hasKey(String key);

    boolean hasKey(String key,String value);
    void select(Integer dbIndex);

    Set<String> keys(Integer dbIndex);

    Object getHashObj(final String key,final String value);

    void putHashAllObj(final String key,final Map<String,Object> value);
    Map<Object,Object> getHashEntries(final String key);

    void putHashAllPipeObj(final Map<String,Map<String,Object> >map);

    Map<String,Map<String,String>> hgetall(Map<Integer, List<String>> pointmap);

    void  unbindConnection();

}