in src/main/java/org/apache/geronimo/jcache/simple/SimpleConfiguration.java [59:92]
public SimpleConfiguration(final Configuration<K, V> configuration, final Class<K> keyType, final Class<V> valueType) {
this.keyType = keyType;
this.valueType = valueType;
if (configuration instanceof CompleteConfiguration) {
final CompleteConfiguration<K, V> cConfiguration = (CompleteConfiguration<K, V>) configuration;
storeByValue = configuration.isStoreByValue();
readThrough = cConfiguration.isReadThrough();
writeThrough = cConfiguration.isWriteThrough();
statisticsEnabled = cConfiguration.isStatisticsEnabled();
managementEnabled = cConfiguration.isManagementEnabled();
cacheLoaderFactory = cConfiguration.getCacheLoaderFactory();
cacheWristerFactory = cConfiguration.getCacheWriterFactory();
this.expiryPolicyFactory = cConfiguration.getExpiryPolicyFactory();
cacheEntryListenerConfigurations = new HashSet<>();
final Iterable<CacheEntryListenerConfiguration<K, V>> entryListenerConfigurations = cConfiguration
.getCacheEntryListenerConfigurations();
if (entryListenerConfigurations != null) {
for (final CacheEntryListenerConfiguration<K, V> kvCacheEntryListenerConfiguration : entryListenerConfigurations) {
cacheEntryListenerConfigurations.add(kvCacheEntryListenerConfiguration);
}
}
} else {
expiryPolicyFactory = EternalExpiryPolicy.factoryOf();
storeByValue = true;
readThrough = false;
writeThrough = false;
statisticsEnabled = false;
managementEnabled = false;
cacheLoaderFactory = null;
cacheWristerFactory = null;
cacheEntryListenerConfigurations = new HashSet<>();
}
}