|
@ -16,9 +16,9 @@ import org.springframework.dao.DataAccessException;
|
|
import org.springframework.data.redis.connection.RedisConnection;
|
|
import org.springframework.data.redis.connection.RedisConnection;
|
|
import org.springframework.data.redis.core.RedisCallback;
|
|
import org.springframework.data.redis.core.RedisCallback;
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
@ -32,7 +32,7 @@ import java.util.Map;
|
|
* @author 张进军
|
|
* @author 张进军
|
|
* @date 2017/11/30 17:07
|
|
* @date 2017/11/30 17:07
|
|
*/
|
|
*/
|
|
@Controller
|
|
|
|
|
|
@RestController
|
|
@RequestMapping(value = ApiVersion.Version1_0)
|
|
@RequestMapping(value = ApiVersion.Version1_0)
|
|
@Api(description = "缓存统计接口", tags = {"缓存服务管理--缓存统计接口"})
|
|
@Api(description = "缓存统计接口", tags = {"缓存服务管理--缓存统计接口"})
|
|
public class RedisCacheStatisticsEndPoint extends EnvelopRestEndPoint {
|
|
public class RedisCacheStatisticsEndPoint extends EnvelopRestEndPoint {
|
|
@ -45,7 +45,7 @@ public class RedisCacheStatisticsEndPoint extends EnvelopRestEndPoint {
|
|
private RedisTemplate<String, Object> redisTemplate;
|
|
private RedisTemplate<String, Object> redisTemplate;
|
|
|
|
|
|
@ApiOperation("统计缓存分类的缓存数量")
|
|
@ApiOperation("统计缓存分类的缓存数量")
|
|
@RequestMapping(value = ServiceApi.Redis.CacheStatistics.GetCategoryKeys, method = RequestMethod.GET)
|
|
|
|
|
|
@RequestMapping(value = ServiceApi.Redis.CacheStatistics.GetCategoryKeys, method = RequestMethod.POST)
|
|
public Envelop getCategoryKeys() {
|
|
public Envelop getCategoryKeys() {
|
|
Envelop envelop = new Envelop();
|
|
Envelop envelop = new Envelop();
|
|
envelop.setSuccessFlg(false);
|
|
envelop.setSuccessFlg(false);
|
|
@ -73,7 +73,7 @@ public class RedisCacheStatisticsEndPoint extends EnvelopRestEndPoint {
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation("统计缓存分类的缓存内存比率(近似值,比实际略小)")
|
|
@ApiOperation("统计缓存分类的缓存内存比率(近似值,比实际略小)")
|
|
@RequestMapping(value = ServiceApi.Redis.CacheStatistics.GetCategoryMemory, method = RequestMethod.GET)
|
|
|
|
|
|
@RequestMapping(value = ServiceApi.Redis.CacheStatistics.GetCategoryMemory, method = RequestMethod.POST)
|
|
public Envelop getCategoryMemory() {
|
|
public Envelop getCategoryMemory() {
|
|
Envelop envelop = new Envelop();
|
|
Envelop envelop = new Envelop();
|
|
envelop.setSuccessFlg(false);
|
|
envelop.setSuccessFlg(false);
|