mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-21 22:18:55 +00:00
#2343 - Rename Database.getAutoTune() to autoTune() with deprecation
This commit is contained in:
@@ -120,7 +120,15 @@ public interface Database {
|
||||
/**
|
||||
* Return AutoTune which is used to control the AutoTune service at runtime.
|
||||
*/
|
||||
AutoTune getAutoTune();
|
||||
AutoTune autoTune();
|
||||
|
||||
/**
|
||||
* Deprecated migrate to autoTune().
|
||||
*/
|
||||
@Deprecated
|
||||
default AutoTune getAutoTune() {
|
||||
return autoTune();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the associated DataSource for this Database instance.
|
||||
|
||||
@@ -350,7 +350,7 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AutoTune getAutoTune() {
|
||||
public AutoTune autoTune() {
|
||||
return autoTuneService;
|
||||
}
|
||||
|
||||
|
||||
@@ -333,7 +333,7 @@ public class TDSpiEbeanServer implements SpiEbeanServer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AutoTune getAutoTune() {
|
||||
public AutoTune autoTune() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@ public class TestBatchLazy extends BaseTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
Ebean.getDefaultServer().getAutoTune().collectProfiling();
|
||||
Ebean.getDefaultServer().getAutoTune().reportProfiling();
|
||||
Ebean.getDefaultServer().autoTune().collectProfiling();
|
||||
Ebean.getDefaultServer().autoTune().reportProfiling();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public class TestAutofetchTuneWithJoin extends BaseTestCase {
|
||||
|
||||
private static void collectUsage() {
|
||||
|
||||
Ebean.getDefaultServer().getAutoTune().collectProfiling();
|
||||
Ebean.getDefaultServer().autoTune().collectProfiling();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ public class TestAutoTuneProfiling extends BaseTestCase {
|
||||
|
||||
private static void collectUsage() {
|
||||
|
||||
DB.getDefault().getAutoTune().collectProfiling();
|
||||
DB.getDefault().autoTune().collectProfiling();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user