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
|
void |
add(String sqlKey,
CacheBean bean)
加入缓存机制 objectCache
|
void |
add(String sqlKey,
String paramterName,
String tableName)
加入缓存机制 TableCache
|
static ClassCache |
get() |
static Map<String,TypeCache> |
getCache(Class<?> clazz)
从缓存中取出数据(TypeCache)
|
static TypeCache |
getCache(Class<?> clazz,
String paramterName) |
static CacheBean |
getOCache(String sqlKey) |
static Map<String,ParameterCache> |
getPCache(Object clacc) |
static ParameterCache |
getPCache(Object clacc,
String paramterName) |
static TableCache |
getTCache(String sqlKey) |
public static Map<String,TypeCache> getCache(Class<?> clazz)
从缓存中取出数据(TypeCache)
clazz - Classpublic static Map<String,ParameterCache> getPCache(Object clacc)
public static ParameterCache getPCache(Object clacc, String paramterName)
public static TableCache getTCache(String sqlKey)
public 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
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.