public class ClassCache extends Object
class缓存器 字典 饿汉式(内部类懒加载)线程安全行
| 限定符和类型 | 字段和说明 |
|---|---|
static Map<String,Map<String,TypeCache>> |
cache
对象属性缓存器(用于对象填充)--cache
缓存class 全限定名 参数类型 参数
第一个 String: class 全限定名
第二个String: class 属性名
cache---"Map (class, 全限定名称,Map (属性名称,[各个属性的方法,属性类型])) "
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(Class<?> clazz,
String paramterName)
加入缓存机制 Cache
|
void |
add(Class<?> clazz,
String paramterName,
Class<?> paramtertype)
加入缓存机制 cache
|
void |
add(Class<?> clazz,
String paramterName,
Class<?> paramtertype,
String tableName,
String sqlKey)
加入缓存机制 paramCache
加入缓存机制 如果是通用类的属性就用全限定名 存在定义的cache key 以定义为主
|
void |
add(String sqlKey,
CacheBean bean)
加入缓存机制 objectCache
|
void |
add(String sqlKey,
String paramterName,
String tableName)
加入缓存机制 TableCache
|
static ClassCache |
get()
Get class cache.
|
static Map<String,TypeCache> |
getCache(Class<?> clazz)
从缓存中取出数据(TypeCache)
|
static TypeCache |
getCache(Class<?> clazz,
String paramterName)
Gets cache.
|
static CacheBean |
getOCache(String sqlKey)
Gets o cache.
|
static Map<String,ParameterCache> |
getPCache(Object clacc)
Gets p cache.
|
static ParameterCache |
getPCache(Object clacc,
String paramterName)
Gets p cache.
|
static TableCache |
getTCache(String sqlKey)
Gets t cache.
|
public static Map<String,TypeCache> getCache(Class<?> clazz)
从缓存中取出数据(TypeCache)
clazz - Classpublic static TypeCache getCache(Class<?> clazz, String paramterName)
clazz - the clazzparamterName - the paramter namepublic static Map<String,ParameterCache> getPCache(Object clacc)
clacc - the claccpublic static ParameterCache getPCache(Object clacc, String paramterName)
clacc - the claccparamterName - the paramter namepublic static TableCache getTCache(String sqlKey)
sqlKey - the sql keypublic static CacheBean getOCache(String sqlKey)
sqlKey - the sql keypublic void add(Class<?> clazz, String paramterName)
加入缓存机制 Cache
clazz - ClassparamterName - String 添加规则 同一个类对象 只有一个 key 可以有多个 TypeCache 瞬时态
public void add(Class<?> clazz, String paramterName, Class<?> paramtertype)
加入缓存机制 cache
clazz - ClassparamterName - Stringparamtertype - Class 添加规则 同一个类对象 只有一个 key 可以有多个 TypeCache 瞬时态
public void add(Class<?> clazz, String paramterName, Class<?> paramtertype, String tableName, String sqlKey)
加入缓存机制 paramCache
加入缓存机制 如果是通用类的属性就用全限定名 存在定义的cache key 以定义为主
clazz - ClassparamterName - Stringparamtertype - ClasstableName - StringsqlKey - String 添加规则 同一个类对象 只有一个 key 可以有多个 TypeCache 瞬时态
public void add(String sqlKey, String paramterName, String tableName)
加入缓存机制 TableCache
sqlKey - StringparamterName - StringtableName - String 添加规则 同一个类对象 只有一个 key 可以有多个 TypeCache 瞬时态
public void add(String sqlKey, CacheBean bean)
加入缓存机制 objectCache
sqlKey - Stringbean - CacheBean 添加规则 同一个sql+ vo查询语句 只有一个 key 可以有多个
public static ClassCache get()
Copyright © 2019. All rights reserved.