Class AbstractSearchExpressionEvaluatorCache<V extends PrismValue,O extends ObjectType,QK extends QueryKey,QR extends QueryResult<V>>
java.lang.Object
com.evolveum.midpoint.util.caching.AbstractThreadLocalCache
com.evolveum.midpoint.model.common.expression.evaluator.caching.AbstractSearchExpressionEvaluatorCache<V,O,QK,QR>
- Type Parameters:
V
- type of cached result itemsO
- type of raw values that we are searching forQK
- query keyQR
- query result After refactoring, this class contains almost nothing ;) Consider removing it altogether.
- Direct Known Subclasses:
AssociationSearchExpressionEvaluatorCache
public abstract class AbstractSearchExpressionEvaluatorCache<V extends PrismValue,O extends ObjectType,QK extends QueryKey,QR extends QueryResult<V>>
extends AbstractThreadLocalCache
Cache for search expression-based evaluators.
It needs to be customized in the following ways:
- what is in the query key besides basic data - namely, what parts of
ExpressionEvaluationContext
should
be part of the key?
- should we store anything in addition to the resulting list of values? E.g. shadow kind in case of `associationTargetSearch`
that is used for invalidation?-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract QK
createKey
(Class<O> type, Collection<ObjectQuery> queries, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext eeCtx) protected abstract QR
createQueryResult
(Collection<? extends AbstractSearchExpressionEvaluator.ObjectFound<O, V>> objectsFound) protected void
dumpContent
(String threadName) getSearchResult
(Class<O> type, Collection<ObjectQuery> queries, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext eeCtx) protected int
getSize()
void
putSearchResult
(Class<O> type, Collection<ObjectQuery> queries, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext params, Collection<? extends AbstractSearchExpressionEvaluator.ObjectFound<O, V>> objectsFound) void
setClientContextInformation
(Object clientContextInformation) Methods inherited from class com.evolveum.midpoint.util.caching.AbstractThreadLocalCache
debugDump, destroy, dumpContent, enter, exists, exit, getConfiguration, getConfiguration, getEntryCount, getTotalSize, isAvailable, registerHit, registerMiss, registerPass, setConfiguration, supportsObjectType, toString
-
Constructor Details
-
AbstractSearchExpressionEvaluatorCache
public AbstractSearchExpressionEvaluatorCache()
-
-
Method Details
-
getClientContextInformation
-
setClientContextInformation
-
getSearchResult
public List<V> getSearchResult(Class<O> type, Collection<ObjectQuery> queries, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext eeCtx) -
putSearchResult
public void putSearchResult(Class<O> type, Collection<ObjectQuery> queries, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext params, Collection<? extends AbstractSearchExpressionEvaluator.ObjectFound<O, V>> objectsFound) -
createKey
@NotNull protected abstract QK createKey(Class<O> type, Collection<ObjectQuery> queries, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext eeCtx) -
createQueryResult
protected abstract QR createQueryResult(Collection<? extends AbstractSearchExpressionEvaluator.ObjectFound<O, V>> objectsFound) -
description
- Specified by:
description
in classAbstractThreadLocalCache
-
getSize
protected int getSize()- Specified by:
getSize
in classAbstractThreadLocalCache
-
dumpContent
- Specified by:
dumpContent
in classAbstractThreadLocalCache
-