public interface ComputingCacheFactory extends ConfigurationAware
ComputingCache instances. An implementation must be
thread-safe.
It's always initialized before other ConfigurationAware components so
that other components can make use of computing cache API.
| Modifier and Type | Method and Description |
|---|---|
<K,V> ComputingCache<K,V> |
create(String consumerId,
ComputingCache.Function<K,V> computingFunction,
Long expirationTimeout,
Long maxSize,
ComputingCache.Listener<K> listener)
The
ComputingCache implementations are not required to implement
eviction operations (expiration timeout, maximum size, listener). |
getConfigurationKeys, init<K,V> ComputingCache<K,V> create(String consumerId, ComputingCache.Function<K,V> computingFunction, Long expirationTimeout, Long maxSize, ComputingCache.Listener<K> listener)
ComputingCache implementations are not required to implement
eviction operations (expiration timeout, maximum size, listener).
However, a ComputingCacheFactory must either log a warning
message or throw a runtime exception in such cases.
Clients who require maximum performance should not make use of eviction operations.
consumerId - Allow the factory to identify the cache consumercomputingFunction - expirationTimeout - Expiration timeout in milliseconds - a cache entry may be
automatically removed from the cache when the specified amount
of time elapses after its creationmaxSize - Maximum size of the cache, subsequent eviction operation is
implementation-specificlistener - Copyright © 2017. All rights reserved.