com.avaje.ebean
Interface AdminAutofetch


public interface AdminAutofetch

Administrative control of Autofetch during runtime.


Method Summary
 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).
 int getProfilingBase()
          Return the number of queries profiled after which profiling is collected at a percentage rate.
 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 automatic query tuning is enabled.
 void setProfiling(boolean enable)
          Set to true to enable profiling.
 void setProfilingBase(int profilingBase)
          Set a base number of queries to profile per query point.
 void setProfilingMin(int autoFetchMinThreshold)
          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 automatic query tuning.
 String updateTunedQueryInfo()
          This will take the current profiling information and update the "tuned query detail".
 

Method Detail

isProfiling

boolean isProfiling()
Return true if profiling is enabled.


setProfiling

void setProfiling(boolean enable)
Set to true to enable profiling.


isQueryTuning

boolean isQueryTuning()
Return true if autoFetch automatic query tuning is enabled.


setQueryTuning

void setQueryTuning(boolean enable)
Set to true to enable autoFetch automatic query tuning.


getProfilingRate

double getProfilingRate()
Returns the rate which profiling is collected. This is an int between 0 and 100.


setProfilingRate

void setProfilingRate(double rate)
Set the rate at which profiling is collected after the base.

Parameters:
rate - a int between 0 and 100.

getProfilingBase

int getProfilingBase()
Return the number of queries profiled after which profiling is collected at a percentage rate.


setProfilingBase

void setProfilingBase(int profilingBase)
Set a base number of queries to profile per query point.

After this amount of profiling has been obtained profiling is collected at the Profiling Percentage rate.


getProfilingMin

int getProfilingMin()
Return the minimum number of queries profiled before autoFetch will start automatically tuning the queries.

This could be one which means start autoFetch tuning after the first profiling information is collected.


setProfilingMin

void setProfilingMin(int autoFetchMinThreshold)
Set the minimum number of queries profiled per query point before autoFetch will automatically tune the queries.

Increasing this number will mean more profiling is collected before autoFetch starts tuning the query.


collectUsageViaGC

String collectUsageViaGC()
Fire a garbage collection (hint to the JVM). Assuming garbage collection fires this will gather the usage profiling information.


updateTunedQueryInfo

String updateTunedQueryInfo()
This will take the current profiling information and update the "tuned query detail".

This is done periodically and can also be manually invoked.

Returns:
a summary of the updates that occurred

clearTunedQueryInfo

int clearTunedQueryInfo()
Clear all the tuned query info.

Should only need do this for testing and playing around.

Returns:
the amount of tuned query information cleared.

clearProfilingInfo

int clearProfilingInfo()
Clear all the profiling information.

This means the profiling information will need to be re-gathered.

Should only need do this for testing and playing around.

Returns:
the amount of profiled information cleared.

clearQueryStatistics

void clearQueryStatistics()
Clear the query execution statistics.


getTotalTunedQueryCount

int getTotalTunedQueryCount()
Return the number of queries tuned by AutoFetch.


getTotalTunedQuerySize

int getTotalTunedQuerySize()
Return the size of the TuneQuery map.


getTotalProfileSize

int getTotalProfileSize()
Return the size of the profile map.



Copyright © 2010. All Rights Reserved.