All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.crazycake.shiro.IRedisManager Maven / Gradle / Ivy

Go to download

shiro only provide the support of ehcache and concurrentHashMap. Here is an implement of redis cache can be used by shiro. Hope it will help you!

There is a newer version: 3.3.1
Show newest version
package org.crazycake.shiro;

import java.util.Set;

/**
 * redisManager interface
 *
 * @create 2018-02-13 23:58
 **/

public interface IRedisManager {

    /**
     * get value from redis
     * @param key
     * @return
     */
    public byte[] get(byte[] key);

    /**
     * set
     * @param key
     * @param value
     * @return
     */
    public byte[] set(byte[] key, byte[] value);

    /**
     * set
     * @param key
     * @param value
     * @param expire
     * @return
     */
    public byte[] set(byte[] key, byte[] value, int expire);

    /**
     * del
     * @param key
     */
    public void del(byte[] key);

    /**
     * size
     */
    public Long dbSize();

    /**
     * keys
     * @param pattern
     * @return
     */
    public Set keys(byte[] pattern);

    /**
     * expire time
     * @return
     */
    public int getExpire();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy