类 CacheUtil
java.lang.Object
org.anyline.data.cache.CacheUtil
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static StringcrateCachePrimaryKey(String table, DataRow row) 创建集中缓存的keystatic StringcreateCacheElementKey(boolean page, boolean order, String dest, ConfigStore store, String... conditions) 创建cache keystatic StringcreateCacheElementKey(boolean page, boolean order, Table dest, ConfigStore store, String... conditions) static longgetRunTime(String key) 已执行时间static booleanstatic booleanstatic boolean开始刷新 如果不符合刷新条件返回falsestatic voidstatic void刷新完成
-
构造器详细资料
-
CacheUtil
public CacheUtil()
-
-
方法详细资料
-
start
开始刷新 如果不符合刷新条件返回false- 参数:
key- keysec- sec- 返回:
- boolean
-
start
-
stop
刷新完成- 参数:
key- keysec- sec
-
stop
-
isRun
-
getRunTime
已执行时间- 参数:
key- key- 返回:
- long
-
crateCachePrimaryKey
创建集中缓存的key- 参数:
table- 表row- row- 返回:
- String
-
createCacheElementKey
public static String createCacheElementKey(boolean page, boolean order, String dest, ConfigStore store, String... conditions) 创建cache key- 参数:
page- 是否需要拼接分页下标order- orderdest- 查询或操作的目标(表、存储过程、SQL等)store- 根据http等上下文构造查询条件conditions- 查询条件 支持k:v k:v::type 以及原生sql形式(包含ORDER、GROUP、HAVING)默认忽略空值条件- 返回:
- String
-
createCacheElementKey
public static String createCacheElementKey(boolean page, boolean order, Table dest, ConfigStore store, String... conditions)
-