public class MAdminAutofetch extends Object implements MAdminAutofetchMBean, AdminAutofetch
This is accessible via EbeanServer.getAdminAutofetch() or via JMX
MBeans.
| Constructor and Description |
|---|
MAdminAutofetch(AutoFetchManager autoFetchListener) |
| Modifier and Type | Method and Description |
|---|---|
int |
clearProfilingInfo()
Clear all the profiling information.
|
void |
clearQueryStatistics()
Clear the query execution statistics.
|
int |
clearTunedQueryInfo()
Clear all the tuned query info.
|
String |
collectUsageViaGC()
Fire a garbage collection (hint to the JVM).
|
String |
getMode()
This controls whether autoFetch is used when it has not
been explicitly set on a query via
Query#setAutoFetch(boolean). |
String |
getModeOptions()
List of the valid implicit modes that can be used.
|
int |
getProfilingBase()
Return the max number of queries profiled (per query point).
|
int |
getProfilingMin()
Return the minimum number of queries profiled before autoFetch will start
automatically tuning the queries.
|
double |
getProfilingRate()
Returns the rate which profiling is collected.
|
int |
getTotalProfileSize()
Return the size of the profile map.
|
int |
getTotalTunedQueryCount()
Return the number of queries tuned by AutoFetch.
|
int |
getTotalTunedQuerySize()
Return the size of the TuneQuery map.
|
boolean |
isProfiling()
Return true if profiling is enabled.
|
boolean |
isQueryTuning()
Return true if autoFetch is enabled.
|
void |
setMode(String implicitMode)
Set the auto fetch mode used when a query has not had
Query#setAutoFetch(boolean). |
void |
setProfiling(boolean enable)
Set to true to enable profiling.
|
void |
setProfilingBase(int profilingMax)
Set a max number of queries to profile per query point.
|
void |
setProfilingMin(int profilingMin)
Set the minimum number of queries profiled per query point before
autoFetch will automatically tune the queries.
|
void |
setProfilingRate(double rate)
Set the rate at which profiling is collected after the base.
|
void |
setQueryTuning(boolean enable)
Set to true to enable autoFetch.
|
String |
updateTunedQueryInfo()
This will take the current profiling information and update the "tuned query
detail".
|
public MAdminAutofetch(AutoFetchManager autoFetchListener)
public boolean isQueryTuning()
MAdminAutofetchMBeanisQueryTuning in interface AdminAutofetchisQueryTuning in interface MAdminAutofetchMBeanpublic void setQueryTuning(boolean enable)
MAdminAutofetchMBeansetQueryTuning in interface AdminAutofetchsetQueryTuning in interface MAdminAutofetchMBeanpublic boolean isProfiling()
MAdminAutofetchMBeanisProfiling in interface AdminAutofetchisProfiling in interface MAdminAutofetchMBeanpublic void setProfiling(boolean enable)
MAdminAutofetchMBeansetProfiling in interface AdminAutofetchsetProfiling in interface MAdminAutofetchMBeanpublic String getModeOptions()
MAdminAutofetchMBeangetModeOptions in interface MAdminAutofetchMBeanpublic String getMode()
MAdminAutofetchMBeanQuery#setAutoFetch(boolean).getMode in interface MAdminAutofetchMBeanpublic void setMode(String implicitMode)
MAdminAutofetchMBeanQuery#setAutoFetch(boolean).setMode in interface MAdminAutofetchMBeanpublic String collectUsageViaGC()
MAdminAutofetchMBeancollectUsageViaGC in interface AdminAutofetchcollectUsageViaGC in interface MAdminAutofetchMBeanpublic double getProfilingRate()
MAdminAutofetchMBeangetProfilingRate in interface AdminAutofetchgetProfilingRate in interface MAdminAutofetchMBeanpublic void setProfilingRate(double rate)
MAdminAutofetchMBeansetProfilingRate in interface AdminAutofetchsetProfilingRate in interface MAdminAutofetchMBeanrate - a int between 0 and 100.public int getProfilingMin()
MAdminAutofetchMBeanThis could be one which means start autoFetch tuning after the first profiling information is collected.
getProfilingMin in interface AdminAutofetchgetProfilingMin in interface MAdminAutofetchMBeanpublic int getProfilingBase()
MAdminAutofetchMBeanThe number of queries profiled is collected per query point. Once a query point has profiled this number of queries it does not profile any more.
getProfilingBase in interface AdminAutofetchgetProfilingBase in interface MAdminAutofetchMBeanpublic void setProfilingMin(int profilingMin)
MAdminAutofetchMBeanIncreasing this number will mean more profiling is collected before autoFetch starts tuning the query.
setProfilingMin in interface AdminAutofetchsetProfilingMin in interface MAdminAutofetchMBeanpublic void setProfilingBase(int profilingMax)
MAdminAutofetchMBeanThis number should provide a level of confidence that no more profiling is required for this query point.
setProfilingBase in interface AdminAutofetchsetProfilingBase in interface MAdminAutofetchMBeanpublic String updateTunedQueryInfo()
MAdminAutofetchMBeanThis is done periodically and can also be manually invoked.
updateTunedQueryInfo in interface AdminAutofetchupdateTunedQueryInfo in interface MAdminAutofetchMBeanpublic int clearProfilingInfo()
MAdminAutofetchMBeanThis means the profiling information will need to be re-gathered.
Should only need do this for testing and playing around.
clearProfilingInfo in interface AdminAutofetchclearProfilingInfo in interface MAdminAutofetchMBeanpublic int clearTunedQueryInfo()
MAdminAutofetchMBeanShould only need do this for testing and playing around.
clearTunedQueryInfo in interface AdminAutofetchclearTunedQueryInfo in interface MAdminAutofetchMBeanpublic void clearQueryStatistics()
AdminAutofetchclearQueryStatistics in interface AdminAutofetchpublic int getTotalProfileSize()
MAdminAutofetchMBeangetTotalProfileSize in interface AdminAutofetchgetTotalProfileSize in interface MAdminAutofetchMBeanpublic int getTotalTunedQueryCount()
MAdminAutofetchMBeangetTotalTunedQueryCount in interface AdminAutofetchgetTotalTunedQueryCount in interface MAdminAutofetchMBeanpublic int getTotalTunedQuerySize()
MAdminAutofetchMBeangetTotalTunedQuerySize in interface AdminAutofetchgetTotalTunedQuerySize in interface MAdminAutofetchMBeanCopyright © 2014. All Rights Reserved.