public class AutofetchConfig extends Object
| Constructor and Description |
|---|
AutofetchConfig() |
| Modifier and Type | Method and Description |
|---|---|
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 |
isGarbageCollectionOnShutdown()
Return true if GC should be trigger on shutdown.
|
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.
|
void |
loadSettings(GlobalProperties.PropertySource p)
Load the settings from the properties file.
|
void |
setGarbageCollectionOnShutdown(boolean garbageCollectionOnShutdown)
Set to true if you want GC to trigger on shutdown.
|
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.
|
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 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 boolean isGarbageCollectionOnShutdown()
Autofetch profiling information is collected as part of garbage collection.
public void setGarbageCollectionOnShutdown(boolean garbageCollectionOnShutdown)
This would be done if you want to try and collect Autofetch profiling information on shutdown.
public void loadSettings(GlobalProperties.PropertySource p)
Copyright © 2014. All Rights Reserved.