public abstract class SearchCache
extends java.lang.Object
implements com.exalead.util.Checkable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
boolean |
cacheQueries |
static boolean |
DEFAULT_CACHE_QUERIES |
static java.lang.String |
DEFAULT_IGNORE_FROM_CACHE_KEY |
static int |
DEFAULT_MAX_CACHED_QUERIES |
static int |
DEFAULT_WARMUP_THREADS |
static double |
DEFAULT_WARMUP_WORK_RATIO |
java.lang.String |
ignoreFromCacheKey |
int |
maxCachedQueries |
java.lang.String |
name |
java.util.List<WarmUpQuery> |
warmUpQuery |
int |
warmupThreads |
double |
warmupWorkRatio |
Constructor and Description |
---|
SearchCache() |
SearchCache(SearchCache o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
check(boolean deep,
java.lang.String errorContext)
Checks this SearchCache.
|
static SearchCache |
fromString(java.lang.String s)
String representation of this SearchCache.
|
java.lang.String |
getIgnoreFromCacheKey()
List of url query parameters to ignore from the cache key construction.
Separate each field with a come ",". |
int |
getMaxCachedQueries()
Maximum number of queries to cache.
Additional queries are evicted using a LRU algorithm. |
java.lang.String |
getName() |
java.util.List<WarmUpQuery> |
getWarmUpQuery()
Queries that will be automatically cached
|
int |
getWarmupThreads()
Maximum number of threads for warmup
|
double |
getWarmupWorkRatio()
Maximum ratio of time each warm-up thread will work.
|
boolean |
isCacheQueries()
Should this cache handle caching of incoming queries.
|
SearchCache |
makeCopy() |
static SearchCache |
readFrom(java.io.InputStream is)
Read this SearchCache from an XML fragment.
|
void |
setCacheQueries(boolean cacheQueries)
Should this cache handle caching of incoming queries.
|
void |
setIgnoreFromCacheKey(java.lang.String ignoreFromCacheKey)
List of url query parameters to ignore from the cache key construction.
Separate each field with a come ",". |
void |
setMaxCachedQueries(int maxCachedQueries)
Maximum number of queries to cache.
Additional queries are evicted using a LRU algorithm. |
void |
setName(java.lang.String name) |
void |
setWarmupThreads(int warmupThreads)
Maximum number of threads for warmup
|
void |
setWarmupWorkRatio(double warmupWorkRatio)
Maximum ratio of time each warm-up thread will work.
|
java.lang.String |
toString()
String representation of this SearchCache.
|
SearchCache |
withCacheQueries(boolean cacheQueries) |
SearchCache |
withCacheQueries(java.lang.Boolean cacheQueries) |
SearchCache |
withIgnoreFromCacheKey(java.lang.String ignoreFromCacheKey) |
SearchCache |
withMaxCachedQueries(int maxCachedQueries) |
SearchCache |
withMaxCachedQueries(java.lang.Integer maxCachedQueries) |
SearchCache |
withName(java.lang.String name) |
SearchCache |
withWarmUpQuery(java.util.Collection<WarmUpQuery> __values) |
SearchCache |
withWarmUpQuery(WarmUpQuery... __values)
Queries that will be automatically cached
|
SearchCache |
withWarmupThreads(int warmupThreads) |
SearchCache |
withWarmupThreads(java.lang.Integer warmupThreads) |
SearchCache |
withWarmupWorkRatio(double warmupWorkRatio) |
void |
writeTo(java.io.OutputStream os) |
public java.lang.String name
public java.util.List<WarmUpQuery> warmUpQuery
public double warmupWorkRatio
public static final double DEFAULT_WARMUP_WORK_RATIO
public int warmupThreads
public static final int DEFAULT_WARMUP_THREADS
public boolean cacheQueries
public static final boolean DEFAULT_CACHE_QUERIES
public int maxCachedQueries
public static final int DEFAULT_MAX_CACHED_QUERIES
public java.lang.String ignoreFromCacheKey
public static final java.lang.String DEFAULT_IGNORE_FROM_CACHE_KEY
public SearchCache()
public SearchCache(SearchCache o)
public void setName(java.lang.String name)
public java.lang.String getName()
public SearchCache withName(java.lang.String name)
public java.util.List<WarmUpQuery> getWarmUpQuery()
public SearchCache withWarmUpQuery(WarmUpQuery... __values)
public SearchCache withWarmUpQuery(java.util.Collection<WarmUpQuery> __values)
public void setWarmupWorkRatio(double warmupWorkRatio)
public double getWarmupWorkRatio()
public SearchCache withWarmupWorkRatio(double warmupWorkRatio)
public void setWarmupThreads(int warmupThreads)
public int getWarmupThreads()
public SearchCache withWarmupThreads(int warmupThreads)
public SearchCache withWarmupThreads(java.lang.Integer warmupThreads)
public void setCacheQueries(boolean cacheQueries)
public boolean isCacheQueries()
public SearchCache withCacheQueries(boolean cacheQueries)
public SearchCache withCacheQueries(java.lang.Boolean cacheQueries)
public void setMaxCachedQueries(int maxCachedQueries)
public int getMaxCachedQueries()
public SearchCache withMaxCachedQueries(int maxCachedQueries)
public SearchCache withMaxCachedQueries(java.lang.Integer maxCachedQueries)
public void setIgnoreFromCacheKey(java.lang.String ignoreFromCacheKey)
public java.lang.String getIgnoreFromCacheKey()
public SearchCache withIgnoreFromCacheKey(java.lang.String ignoreFromCacheKey)
public SearchCache makeCopy()
public static SearchCache readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
javax.xml.bind.JAXBException
java.io.IOException
public static SearchCache fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
toString
in class java.lang.Object
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
com.exalead.util.TypedException
Copyright © 2021 Dassault Systèmes, All Rights Reserved.