Class AbstractThreadLocalCache
- java.lang.Object
-
- com.evolveum.midpoint.util.caching.AbstractThreadLocalCache
-
public abstract class AbstractThreadLocalCache extends Object
Common supertype for various thread-local caches (parts of RepositoryCache but also others).
-
-
Constructor Summary
Constructors Constructor Description AbstractThreadLocalCache()
-
Method Summary
-
-
-
Method Detail
-
enter
public static <T extends AbstractThreadLocalCache> T enter(ConcurrentHashMap<Thread,T> cacheThreadMap, Class<T> cacheClass, CacheConfiguration configuration, Trace logger)
-
exit
public static <T extends AbstractThreadLocalCache> T exit(ConcurrentHashMap<Thread,T> cacheThreadMap, Trace logger)
-
destroy
public static <T extends AbstractThreadLocalCache> void destroy(ConcurrentHashMap<Thread,T> cacheThreadMap, Trace logger)
-
getEntryCount
public int getEntryCount()
-
exists
public static boolean exists(ConcurrentHashMap<Thread,? extends AbstractThreadLocalCache> instances)
-
debugDump
public static <T extends AbstractThreadLocalCache> String debugDump(ConcurrentHashMap<Thread,T> instances)
-
description
public abstract String description()
-
registerHit
public void registerHit()
-
registerMiss
public void registerMiss()
-
registerPass
public void registerPass()
-
supportsObjectType
public boolean supportsObjectType(Class<?> type)
-
isAvailable
public boolean isAvailable()
-
getConfiguration
public CacheConfiguration.CacheObjectTypeConfiguration getConfiguration(Class<?> type)
-
getConfiguration
public CacheConfiguration getConfiguration()
-
setConfiguration
public void setConfiguration(CacheConfiguration configuration)
-
getTotalSize
public static <T extends AbstractThreadLocalCache> int getTotalSize(ConcurrentHashMap<Thread,T> cacheInstances)
-
getSize
protected abstract int getSize()
-
dumpContent
public static <T extends AbstractThreadLocalCache> void dumpContent(ConcurrentHashMap<Thread,T> cacheInstances)
-
dumpContent
protected abstract void dumpContent(String threadName)
-
-