K - The key classV - Thed value classpublic class InternalBuilder<K,V> extends Builder<K,V>
build() call. It cannot
be transmitted over the network, as it contains a Classloader and other non-serializable fields. If you want to transmit a CompleteConfiguration
you should instantiate a Builder instead, which contains a CompleteConfiguration.
Implementation note: The factory has been moved from Builder to this class, to keep Builder a pure configuration class. The factory was in fact never copied in Builder.copyBuilder(), and thus it was removed from Serialization in the course of finalizing the v1.0 API.
TriavaCacheConfiguration.PropsType| Constructor and Description |
|---|
InternalBuilder(TCacheFactory factory) |
InternalBuilder(TCacheFactory factory,
javax.cache.configuration.Configuration<K,V> configuration) |
| Modifier and Type | Method and Description |
|---|---|
Cache<K,V> |
build()
Builds a Cache from the parameters that were set. evictionType defines the eviction policy.
|
addCacheEntryListenerConfiguration, asProperties, equals, getCacheEntryListenerConfigurations, getCacheLoaderFactory, getCacheWriteMode, getCacheWriterFactory, getCleanUpIntervalMillis, getConcurrencyLevel, getEvictionClass, getEvictionPolicy, getExpiryPolicyFactory, getHashImplementation, getId, getJamPolicy, getKeyType, getLoader, getMapConcurrencyLevel, getMaxCacheTime, getMaxCacheTimeSpread, getMaxElements, getMaxIdleTime, getStatistics, getValueType, hashCode, isManagementEnabled, isReadThrough, isStatisticsEnabled, isStoreByValue, isStrictJSR107, isWriteThrough, removeCacheEntryListenerConfiguration, setCacheLoaderFactory, setCacheWriteMode, setCacheWriterFactory, setCleanupInterval, setConcurrencyLevel, setEvictionClass, setEvictionPolicy, setExpectedMapSize, setExpiryPolicyFactory, setHashImplementation, setId, setJamPolicy, setKeyType, setLoader, setManagement, setMaxCacheTime, setMaxCacheTime, setMaxElements, setMaxIdleTime, setReadThrough, setStatistics, setStrictJSR107, setValueType, setWriteThrough, storageFactorypublic InternalBuilder(TCacheFactory factory)
public InternalBuilder(TCacheFactory factory, javax.cache.configuration.Configuration<K,V> configuration)
public Cache<K,V> build()
Builderprivate long maxIdleTime = 1800; private long maxCacheTime = 3600; private int expectedMapSize = 10000; private int concurrencyLevel = 16; private TCacheEvictionType evictionType = TCacheEvictionType.LFU;Any Cache created by
Builder.build() is registered in the associated factory/CacheManager.Copyright © 2018 trivago. All rights reserved.