
com.avaje.ebean.AdminAutofetch Maven / Gradle / Ivy
The newest version!
package com.avaje.ebean;
/**
* Administrative control of Autofetch during runtime.
*/
public interface AdminAutofetch {
/**
* Return true if profiling is enabled.
*/
public boolean isProfiling();
/**
* Set to true to enable profiling.
*/
public void setProfiling(boolean enable);
/**
* Return true if autoFetch automatic query tuning is enabled.
*/
public boolean isQueryTuning();
/**
* Set to true to enable autoFetch automatic query tuning.
*/
public void setQueryTuning(boolean enable);
/**
* Returns the rate which profiling is collected. This is an int between 0 and
* 100.
*/
public double getProfilingRate();
/**
* Set the rate at which profiling is collected after the base.
*
* @param rate
* a int between 0 and 100.
*/
public void setProfilingRate(double rate);
/**
* Return the number of queries profiled after which profiling is collected at
* a percentage rate.
*/
public int getProfilingBase();
/**
* 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.
*
*/
public void setProfilingBase(int profilingBase);
/**
* 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.
*
*/
public int getProfilingMin();
/**
* 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.
*
*/
public void setProfilingMin(int autoFetchMinThreshold);
/**
* Fire a garbage collection (hint to the JVM). Assuming garbage collection
* fires this will gather the usage profiling information.
*/
public String collectUsageViaGC();
/**
* This will take the current profiling information and update the "tuned
* query detail".
*
* This is done periodically and can also be manually invoked.
*
*
* @return a summary of the updates that occurred
*/
public String updateTunedQueryInfo();
/**
* Clear all the tuned query info.
*
* Should only need do this for testing and playing around.
*
*
* @return the amount of tuned query information cleared.
*/
public int clearTunedQueryInfo();
/**
* 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.
*
*
* @return the amount of profiled information cleared.
*/
public int clearProfilingInfo();
/**
* Clear the query execution statistics.
*/
public void clearQueryStatistics();
/**
* Return the number of queries tuned by AutoFetch.
*/
public int getTotalTunedQueryCount();
/**
* Return the size of the TuneQuery map.
*/
public int getTotalTunedQuerySize();
/**
* Return the size of the profile map.
*/
public int getTotalProfileSize();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy