Package io.ebean.cache
Class ServerCacheOptions
- java.lang.Object
-
- io.ebean.cache.ServerCacheOptions
-
public class ServerCacheOptions extends Object
Options for controlling a cache.
-
-
Constructor Summary
Constructors Constructor Description ServerCacheOptions()Construct 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerCacheOptionsapplyDefaults(ServerCacheOptions defaults)Apply any settings from the default settings that have not already been specifically set.ServerCacheOptionscopy()Return a copy of this object.ServerCacheOptionscopy(boolean nearCache)Return a copy of this object with nearCache option.intgetMaxIdleSecs()Return the maximum idle time.intgetMaxSecsToLive()Return the maximum time to live.intgetMaxSize()Return the maximum cache size.intgetTrimFrequency()Return the trim frequency in seconds.booleanisNearCache()Return 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 Detail
-
ServerCacheOptions
public ServerCacheOptions()
Construct with no set options.
-
ServerCacheOptions
public ServerCacheOptions(io.ebean.annotation.CacheBeanTuning tuning)
Create from the cacheTuning deployment annotation.
-
ServerCacheOptions
public ServerCacheOptions(io.ebean.annotation.CacheQueryTuning cacheTuning)
Create from the cacheTuning deployment annotation.
-
ServerCacheOptions
public ServerCacheOptions(boolean nearCache, io.ebean.annotation.CacheBeanTuning tuning)
Create with nearCache option.
-
-
Method Detail
-
applyDefaults
public ServerCacheOptions applyDefaults(ServerCacheOptions defaults)
Apply any settings from the default settings that have not already been specifically set.
-
copy
public ServerCacheOptions copy()
Return a copy of this object.
-
copy
public ServerCacheOptions copy(boolean nearCache)
Return a copy of this object with nearCache option.
-
isNearCache
public boolean isNearCache()
Return true if nearCache was explicitly turned on.
-
setNearCache
public void setNearCache(boolean nearCache)
Turn on nearCache option.
-
getMaxSize
public int getMaxSize()
Return the maximum cache size.
-
setMaxSize
public void setMaxSize(int maxSize)
Set the maximum cache size.
-
getMaxIdleSecs
public int getMaxIdleSecs()
Return the maximum idle time.
-
setMaxIdleSecs
public void setMaxIdleSecs(int maxIdleSecs)
Set the maximum idle time.
-
getMaxSecsToLive
public int getMaxSecsToLive()
Return the maximum time to live.
-
setMaxSecsToLive
public void setMaxSecsToLive(int maxSecsToLive)
Set the maximum time to live.
-
getTrimFrequency
public int getTrimFrequency()
Return the trim frequency in seconds.
-
setTrimFrequency
public void setTrimFrequency(int trimFrequency)
Set the trim frequency in seconds.
-
-