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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract QKcreateKey(Class<O> type, Collection<ObjectQuery> queries, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext eeCtx) protected abstract QRcreateQueryResult(Collection<? extends AbstractSearchExpressionEvaluator.ObjectFound<O, V>> objectsFound) protected voiddumpContent(String threadName) getSearchResult(Class<O> type, Collection<ObjectQuery> queries, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext eeCtx) protected intgetSize()voidputSearchResult(Class<O> type, Collection<ObjectQuery> queries, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext params, Collection<? extends AbstractSearchExpressionEvaluator.ObjectFound<O, V>> objectsFound) voidsetClientContextInformation(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:
descriptionin classAbstractThreadLocalCache
-
getSize
protected int getSize()- Specified by:
getSizein classAbstractThreadLocalCache
-
dumpContent
- Specified by:
dumpContentin classAbstractThreadLocalCache
-