Class AbstractThreadLocalCache
java.lang.Object
com.evolveum.midpoint.util.caching.AbstractThreadLocalCache
Common supertype for various thread-local caches (parts of RepositoryCache but also others).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends AbstractThreadLocalCache>
StringdebugDump
(ConcurrentHashMap<Thread, T> instances) abstract String
static <T extends AbstractThreadLocalCache>
voiddestroy
(ConcurrentHashMap<Thread, T> cacheThreadMap, Trace logger) protected abstract void
dumpContent
(String threadName) static <T extends AbstractThreadLocalCache>
voiddumpContent
(ConcurrentHashMap<Thread, T> cacheInstances) static <T extends AbstractThreadLocalCache>
Tenter
(ConcurrentHashMap<Thread, T> cacheThreadMap, Class<T> cacheClass, CacheConfiguration configuration, Trace logger) static boolean
exists
(ConcurrentHashMap<Thread, ? extends AbstractThreadLocalCache> instances) static <T extends AbstractThreadLocalCache>
Texit
(ConcurrentHashMap<Thread, T> cacheThreadMap, Trace logger) getConfiguration
(Class<?> type) int
protected abstract int
getSize()
static <T extends AbstractThreadLocalCache>
intgetTotalSize
(ConcurrentHashMap<Thread, T> cacheInstances) boolean
void
void
void
void
setConfiguration
(CacheConfiguration configuration) boolean
supportsObjectType
(Class<?> type) toString()
-
Constructor Details
-
AbstractThreadLocalCache
public AbstractThreadLocalCache()
-
-
Method Details
-
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
-
registerHit
public void registerHit() -
registerMiss
public void registerMiss() -
registerPass
public void registerPass() -
supportsObjectType
-
isAvailable
public boolean isAvailable() -
getConfiguration
-
getConfiguration
-
setConfiguration
-
toString
-
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
-