Package org.cache2k.jcache
Class JCacheConfig.Builder
- java.lang.Object
-
- org.cache2k.jcache.JCacheConfig.Builder
-
- All Implemented Interfaces:
org.cache2k.config.ConfigBuilder<JCacheConfig.Builder,JCacheConfig>
,org.cache2k.config.SectionBuilder<JCacheConfig.Builder,JCacheConfig>
- Enclosing class:
- JCacheConfig
public static class JCacheConfig.Builder extends Object implements org.cache2k.config.SectionBuilder<JCacheConfig.Builder,JCacheConfig>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JCacheConfig
config()
JCacheConfig.Builder
copyAlwaysIfRequested(boolean f)
Whentrue
, copy keys and values when entering and leaving the cache in caseConfiguration.isStoreByValue()
istrue
.JCacheConfig.Builder
enableManagement(boolean f)
Whentrue
makes the JMX management bean for the cache available.JCacheConfig.Builder
enableReadThrough(boolean f)
Whentrue
, operate cache in read through mode and use the configured loader when there is no mapping for a key yet.JCacheConfig.Builder
enableStatistics(boolean f)
Whentrue
, exposes cache statistics via JMX.JCacheConfig.Builder
supportOnlineListenerAttachment(boolean f)
Set to true, if online register and deregister of event listeners needs to be supported.
-
-
-
Method Detail
-
copyAlwaysIfRequested
public JCacheConfig.Builder copyAlwaysIfRequested(boolean f)
Whentrue
, copy keys and values when entering and leaving the cache in caseConfiguration.isStoreByValue()
istrue
. This needs to be enabled for 100% JCache compatibility. Default, if no cache2k configuration is present:true
. Default in cache2k configuration mode:false
.
-
supportOnlineListenerAttachment
public JCacheConfig.Builder supportOnlineListenerAttachment(boolean f)
Set to true, if online register and deregister of event listeners needs to be supported. Default, if no cache2k configuration is present:true
. Default in cache2k configuration mode:false
.- See Also:
Cache.registerCacheEntryListener(CacheEntryListenerConfiguration)
-
enableManagement
public JCacheConfig.Builder enableManagement(boolean f)
Whentrue
makes the JMX management bean for the cache available. Identical to the flag in the JCache configuration object.- See Also:
CompleteConfiguration.isManagementEnabled()
-
enableStatistics
public JCacheConfig.Builder enableStatistics(boolean f)
Whentrue
, exposes cache statistics via JMX. Identical to the flag in the JCache configuration object.- See Also:
CompleteConfiguration.isManagementEnabled()
-
enableReadThrough
public JCacheConfig.Builder enableReadThrough(boolean f)
Whentrue
, operate cache in read through mode and use the configured loader when there is no mapping for a key yet. Identical to the flag in the JCache configuration object.- See Also:
CompleteConfiguration.isReadThrough()
-
config
public JCacheConfig config()
- Specified by:
config
in interfaceorg.cache2k.config.ConfigBuilder<JCacheConfig.Builder,JCacheConfig>
-
-