Jedis之maxInactiveIntervalInSeconds

Jedis的maxInactiveIntervalInSeconds
public class RedisOperationsSessionRepository implements
    FindByIndexNameSessionRepository,
    MessageListener {
    ...
    ...
    ...
    /**在新创建之前以秒为单位设置key的最大存活时间,
     * Sets the maximum inactive interval in seconds between requests before newly created
     * sessions will be invalidated. A negative time indicates that the session will never
     * timeout. The default is 1800 (30 minutes).
     *如果设置为负数,那么key将永远不会过时,默认值是1800秒
     * @param defaultMaxInactiveInterval the number of seconds that the {@link Session}
     * should be kept alive between client requests.
     */
    public void setDefaultMaxInactiveInterval(int defaultMaxInactiveInterval) {
        //有一个默认值是1800秒
        this.defaultMaxInactiveInterval = defaultMaxInactiveInterval;

    } 
    ...
    ...
}

你可能感兴趣的:(Java)