@ProviderType public abstract class CacheFactory extends Object implements javax.faces.FacesWrapper<CacheFactory>
| Constructor and Description |
|---|
CacheFactory() |
| Modifier and Type | Method and Description |
|---|---|
abstract <K,V> Cache<K,V> |
getConcurrentCache(int initialCapacity)
Returns a new instance of
Cache. |
static <K,V> Cache<K,V> |
getConcurrentCacheInstance(javax.faces.context.ExternalContext externalContext,
int initialCapacity)
|
abstract <K,V> Cache<K,V> |
getConcurrentLRUCache(int initialCapacity,
int maxCapacity)
Returns a new instance of
Cache. |
static <K,V> Cache<K,V> |
getConcurrentLRUCacheInstance(javax.faces.context.ExternalContext externalContext,
int initialCapacity,
int maxCapacity)
|
abstract CacheFactory |
getWrapped()
Returns the wrapped factory instance if this factory decorates another.
|
public static <K,V> Cache<K,V> getConcurrentCacheInstance(javax.faces.context.ExternalContext externalContext, int initialCapacity) throws IllegalArgumentException
Cache from the CacheFactory found by the FactoryExtensionFinder. The returned instance is designed to be accessed and modified by multiple threads
concurrently, so it is guaranteed to be Serializable.K - The type of the cache's keys.V - The type of the cache's values.externalContext - The external context associated with the current faces context.initialCapacity - The initial capacity of the cache.IllegalArgumentException - if the initial capacity is less than zero.getConcurrentCache(int)public static <K,V> Cache<K,V> getConcurrentLRUCacheInstance(javax.faces.context.ExternalContext externalContext, int initialCapacity, int maxCapacity) throws IllegalArgumentException
Cache from the CacheFactory found by the FactoryExtensionFinder. The returned instance is designed to be accessed and modified by multiple threads
concurrently, so it is guaranteed to be Serializable. The returned cache will avoid exceeding the
maximum cache capacity by using a least-recently-used algorithm which may cause a significant performance impact
when compared to a cache that does not enforce a maximum size (for example, a cache returned from getConcurrentCache(int)).K - The type of the cache's keys.V - The type of the cache's values.externalContext - The external context associated with the current faces context.initialCapacity - The initial capacity of the cache.maxCapacity - The maximum capacity of the cache.IllegalArgumentException - if the initial capacity is less than zero or the maximum capacity is less than
1.getConcurrentLRUCache(int, int)public abstract <K,V> Cache<K,V> getConcurrentCache(int initialCapacity) throws IllegalArgumentException
Cache. The returned instance is designed to be accessed and modified by
multiple threads concurrently, so it is guaranteed to be Serializable.K - The type of the cache's keys.V - The type of the cache's values.initialCapacity - The initial capacity of the cache.IllegalArgumentException - if the initial capacity is less than zero.public abstract <K,V> Cache<K,V> getConcurrentLRUCache(int initialCapacity, int maxCapacity) throws IllegalArgumentException
Cache. The returned instance is designed to be accessed and modified by
multiple threads concurrently, so it is guaranteed to be Serializable. The returned cache will
avoid exceeding the maximum cache capacity by using a least-recently-used algorithm which may cause a significant
performance impact when compared to a cache that does not enforce a maximum size (for example, a cache returned
from getConcurrentCache(int)).K - The type of the cache's keys.V - The type of the cache's values.initialCapacity - The initial capacity of the cache.maxCapacity - The maximum capacity of the cache.IllegalArgumentException - if the initial capacity is less than zero or the maximum capacity is less than
1.public abstract CacheFactory getWrapped()
getWrapped in interface javax.faces.FacesWrapper<CacheFactory>Copyright © 2020 Liferay, Inc.. All rights reserved.