com.avaje.ebean.cache
Class ServerCacheOptions

java.lang.Object
  extended by com.avaje.ebean.cache.ServerCacheOptions

public class ServerCacheOptions
extends Object

Options for controlling a cache.


Constructor Summary
ServerCacheOptions()
          Construct with no set options.
ServerCacheOptions(CacheTuning cacheTuning)
          Create from the cacheTuning deployment annotation.
ServerCacheOptions(ServerCacheOptions d)
          Create merging default options with the deployment specified ones.
 
Method Summary
 void applyDefaults(ServerCacheOptions defaults)
          Apply any settings from the default settings that have not already been specifically set.
 ServerCacheOptions copy()
          Return a copy of this object.
 int getMaxIdleSecs()
          Return the maximum idle time.
 int getMaxSecsToLive()
          Return the maximum time to live.
 int getMaxSize()
          Return the maximum cache size.
 void setMaxIdleSecs(int maxIdleSecs)
          Set the maximum idle time.
 void setMaxSecsToLive(int maxSecsToLive)
          Set the maximum time to live.
 void setMaxSize(int maxSize)
          Set the maximum cache size.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerCacheOptions

public ServerCacheOptions()
Construct with no set options.


ServerCacheOptions

public ServerCacheOptions(CacheTuning cacheTuning)
Create from the cacheTuning deployment annotation.


ServerCacheOptions

public ServerCacheOptions(ServerCacheOptions d)
Create merging default options with the deployment specified ones.

Method Detail

applyDefaults

public void 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.


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.



Copyright © 2010. All Rights Reserved.