public class StructInfoCache
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <T> StructInfo |
analyze(java.lang.Class<T> t)
Convenience method to get StructInfo from cache and analyze class if not in cache.
|
StructInfo |
get(java.lang.Class<?> clz)
Get StructInfo from cache.
|
double |
getHitRate()
Get cache hit rate.
|
static StructInfoCache |
getInstance()
Get singleton instance.
|
void |
put(java.lang.Class<?> clz,
StructInfo si)
Put StructInfo into cache.
|
void |
reset()
Reset cache.
|
public static StructInfoCache getInstance()
public StructInfo get(java.lang.Class<?> clz)
clz
- class we want StructInfo forpublic void put(java.lang.Class<?> clz, StructInfo si)
clz
- class we have StructInfo forsi
- StructInfopublic double getHitRate()
public void reset()
public static <T> StructInfo analyze(java.lang.Class<T> t) throws RecordException
T
- struct typet
- classRecordException
- if error analyzing cache