public class EntityCacheBuilder extends Object
EntityCache
instance based on the type of caching
needed.Constructor and Description |
---|
EntityCacheBuilder(EntityModel model)
Creates a new
EntityCacheBuilder instance. |
Modifier and Type | Method and Description |
---|---|
EntityCache |
build() |
EntityCacheBuilder |
useCacheManager(javax.cache.CacheManager cacheManager)
Sets the
CacheManager . |
EntityCacheBuilder |
useReferenceCache(boolean enable)
Enables or disables reference (memory) caching.
|
EntityCacheBuilder |
useSerializableCache(boolean enable)
Enables or disables serialization caching.
|
public EntityCacheBuilder(EntityModel model)
EntityCacheBuilder
instance.model
- to usepublic EntityCacheBuilder useReferenceCache(boolean enable)
enable
- true to enable reference caching false otherwise.public EntityCacheBuilder useSerializableCache(boolean enable)
enable
- true to enable serialization caching false otherwise.public EntityCacheBuilder useCacheManager(javax.cache.CacheManager cacheManager)
CacheManager
. to use.cacheManager
- instancepublic EntityCache build()
EntityCache
with the configured options.