Package io.ebean.cache
Class ServerCacheOptions
java.lang.Object
io.ebean.cache.ServerCacheOptions
Options for controlling a cache.
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct with no set options.ServerCacheOptions(boolean nearCache, io.ebean.annotation.CacheBeanTuning tuning) Create with nearCache option.ServerCacheOptions(io.ebean.annotation.CacheBeanTuning tuning) Create from the cacheTuning deployment annotation.ServerCacheOptions(io.ebean.annotation.CacheQueryTuning cacheTuning) Create from the cacheTuning deployment annotation. -
Method Summary
Modifier and TypeMethodDescriptionapplyDefaults(ServerCacheOptions defaults) Apply any settings from the default settings that have not already been specifically set.copy()Return a copy of this object.copy(boolean nearCache) Return a copy of this object with nearCache option.intReturn the maximum idle time.intReturn the maximum time to live.intReturn the maximum cache size.intReturn the trim frequency in seconds.booleanReturn true if nearCache was explicitly turned on.voidsetMaxIdleSecs(int maxIdleSecs) Set the maximum idle time.voidsetMaxSecsToLive(int maxSecsToLive) Set the maximum time to live.voidsetMaxSize(int maxSize) Set the maximum cache size.voidsetNearCache(boolean nearCache) Turn on nearCache option.voidsetTrimFrequency(int trimFrequency) Set the trim frequency in seconds.
-
Constructor Details
-
ServerCacheOptions
public ServerCacheOptions()Construct with no set options. -
ServerCacheOptions
Create from the cacheTuning deployment annotation. -
ServerCacheOptions
Create from the cacheTuning deployment annotation. -
ServerCacheOptions
Create with nearCache option.
-
-
Method Details
-
applyDefaults
Apply any settings from the default settings that have not already been specifically set. -
copy
Return a copy of this object. -
copy
Return a copy of this object with nearCache option. -
isNearCache
Return true if nearCache was explicitly turned on. -
setNearCache
Turn on nearCache option. -
getMaxSize
Return the maximum cache size. -
setMaxSize
Set the maximum cache size. -
getMaxIdleSecs
Return the maximum idle time. -
setMaxIdleSecs
Set the maximum idle time. -
getMaxSecsToLive
Return the maximum time to live. -
setMaxSecsToLive
Set the maximum time to live. -
getTrimFrequency
Return the trim frequency in seconds. -
setTrimFrequency
Set the trim frequency in seconds.
-