|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.avaje.ebean.config.AutofetchConfig
public class AutofetchConfig
Defines the Autofetch behaviour for a EbeanServer.
Constructor Summary | |
---|---|
AutofetchConfig()
|
Method Summary | |
---|---|
int |
getGarbageCollectionWait()
Return the time in millis to wait after a system gc to collect profiling information. |
String |
getLogDirectory()
Return the log directory to put the autofetch log. |
String |
getLogDirectoryWithEval()
Return the log directory substituting any expressions such as ${catalina.base} etc. |
AutofetchMode |
getMode()
Return the mode used when autofetch has not been explicit defined on a query. |
int |
getProfileUpdateFrequency()
Return the frequency in seconds to update the autofetch tuned queries from the profiled information. |
int |
getProfilingBase()
Return the base number of queries to profile before changing to profile only a percentage of following queries (profileRate). |
int |
getProfilingMin()
Return the minimum number of queries to profile before autofetch will start tuning the queries. |
double |
getProfilingRate()
Return the rate (%) of queries to be profiled after the 'base' amount of profiling. |
boolean |
isProfiling()
Return true if profiling information should be collected. |
boolean |
isQueryTuning()
Return true if the queries are being tuned. |
boolean |
isQueryTuningAddVersion()
Return true if the version property should be added when the query is tuned. |
boolean |
isUseFileLogging()
Return true if a log file should be used to log the changes in autofetch query tuning. |
void |
loadSettings(com.avaje.ebean.config.ConfigPropertyMap p)
Load the settings from the properties file. |
void |
setGarbageCollectionWait(int garbageCollectionWait)
Set the time in millis to wait after a System.gc() to collect profiling information. |
void |
setLogDirectory(String logDirectory)
Set the directory to put the autofetch log in. |
void |
setMode(AutofetchMode mode)
Set the mode used when autofetch has not been explicit defined on a query. |
void |
setProfileUpdateFrequency(int profileUpdateFrequency)
Set the frequency in seconds to update the autofetch tuned queries from the profiled information. |
void |
setProfiling(boolean profiling)
Set to true if profiling information should be collected. |
void |
setProfilingBase(int profilingBase)
Set the based number of queries to profile. |
void |
setProfilingMin(int profilingMin)
Set the minimum number of queries to profile before autofetch will start tuning the queries. |
void |
setProfilingRate(double profilingRate)
Set the rate (%) of queries to be profiled after the 'base' amount of profiling. |
void |
setQueryTuning(boolean queryTuning)
Set to true if the queries should be tuned by autofetch. |
void |
setQueryTuningAddVersion(boolean queryTuningAddVersion)
Set to true to force the version property to be always added by the query tuning. |
void |
setUseFileLogging(boolean useFileLogging)
Set to true if a log file should be used to log the changes in autofetch query tuning. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AutofetchConfig()
Method Detail |
---|
public AutofetchMode getMode()
public void setMode(AutofetchMode mode)
public boolean isQueryTuning()
public void setQueryTuning(boolean queryTuning)
public boolean isQueryTuningAddVersion()
If this is false then the version property will be added when profiling detects that the bean is possibly going to be modified.
public void setQueryTuningAddVersion(boolean queryTuningAddVersion)
If this is false then the version property will be added when profiling detects that the bean is possibly going to be modified.
public boolean isProfiling()
public void setProfiling(boolean profiling)
The profiling information is collected and then used to generate the tuned queries for autofetch.
public int getProfilingMin()
public void setProfilingMin(int profilingMin)
public int getProfilingBase()
public void setProfilingBase(int profilingBase)
public double getProfilingRate()
public void setProfilingRate(double profilingRate)
public boolean isUseFileLogging()
public void setUseFileLogging(boolean useFileLogging)
public String getLogDirectory()
public String getLogDirectoryWithEval()
public void setLogDirectory(String logDirectory)
public int getProfileUpdateFrequency()
public void setProfileUpdateFrequency(int profileUpdateFrequency)
public int getGarbageCollectionWait()
The profiling information is collected on object finalise. As such we generally don't want to trigger GC (let the JVM do its thing) but on shutdown the autofetch manager will trigger System.gc() and then wait (default 100 millis) to hopefully collect profiling information - especially for short run unit tests.
public void setGarbageCollectionWait(int garbageCollectionWait)
public void loadSettings(com.avaje.ebean.config.ConfigPropertyMap p)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |