package com.gxzc.zen.umps.config /** * * @author NorthLan * @date 2018/4/24 * @url https://noahlan.com */ class ShiroRedisProperties { /** * Database index used by the connection factory. */ var database = 1 /** * Redis url, which will overrule host, port and password if set. */ var url: String? = null /** * Redis server host. */ var host = "localhost" /** * Login password of the redis server. */ var password: String? = null /** * Redis server port. */ var port = 6379 /** * Connection timeout in milliseconds. */ var timeout: Int = 0 /** * Session Prefix */ var sessionPrefix: String? = null /** * Seconds */ var sessionTime: Long = 0 /** * Redis cache key prefix */ var cachePrefix: String? = null /** * Redis cache expires (Seconds) */ var cacheTime: Long = 0 var pool: Pool = Pool() class Pool { /** * Max number of "idle" connections in the pool. Use a negative value to indicate * an unlimited number of idle connections. */ var maxIdle = 8 /** * Target for the minimum number of idle connections to maintain in the pool. This * setting only has an effect if it is positive. */ var minIdle = 0 /** * Max number of connections that can be allocated by the pool at a given time. * Use a negative value for no limit. */ var maxActive = 8 /** * Maximum amount of time (in milliseconds) a connection allocation should block * before throwing an exception when the pool is exhausted. Use a negative value * to block indefinitely. */ var maxWait = -1 } }