Skip to content

Commit 0d8b846

Browse files
authored
Merge pull request #103 from ebean-orm/feature/remove-experimental-lambdaMode
Remove experimental lambda mode as it now detects it automatically and otherwise...
2 parents f1ff322 + 2e49639 commit 0d8b846

File tree

4 files changed

+3
-16
lines changed

4 files changed

+3
-16
lines changed

ebean-datasource-api/src/main/java/io/ebean/datasource/DataSourceBuilder.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -705,13 +705,6 @@ default DataSourceBuilder initDatabaseForPlatform(String platform) {
705705
*/
706706
DataSourceBuilder validateOnHeartbeat(boolean validateOnHeartbeat);
707707

708-
/**
709-
* EXPERIMENTAL feature - Set to true when using in Lambda to enable an extra
710-
* check to detect when the function has been restored from suspension.
711-
*/
712-
@Deprecated(since = "Experimental feature")
713-
DataSourceBuilder lambdaMode(boolean useLambda);
714-
715708
/**
716709
* Load the settings from the properties with no prefix on the property names.
717710
*

ebean-datasource-api/src/main/java/io/ebean/datasource/DataSourceConfig.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -715,12 +715,6 @@ public DataSourceConfig validateOnHeartbeat(boolean validateOnHeartbeat) {
715715
return this;
716716
}
717717

718-
@Override
719-
public DataSourceBuilder lambdaMode(boolean useLambda) {
720-
this.validateOnHeartbeat = false;
721-
return this;
722-
}
723-
724718
@Override
725719
public DataSourceConfig load(Properties properties) {
726720
return load(properties, null);

ebean-datasource-api/src/test/java/io/ebean/datasource/DataSourceConfigTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public void defaults_someOverride() {
124124
readOnly.setMinConnections(3);
125125
readOnly.setUsername("foo2");
126126
readOnly.setUrl("jdbc:postgresql://127.0.0.2:5432/unit");
127-
readOnly.lambdaMode(true);
127+
readOnly.validateOnHeartbeat(false);
128128

129129
DataSourceBuilder configBuilder = create();
130130
DataSourceConfig readOnly2 = readOnly.setDefaults(configBuilder);
@@ -145,7 +145,7 @@ public void defaults_someOverride2() {
145145
DataSourceConfig readOnly = new DataSourceConfig();
146146
readOnly.setUrl("jdbc:postgresql://127.0.0.2:5432/unit");
147147

148-
DataSourceBuilder configBuilder = create().shutdownOnJvmExit(true).lambdaMode(true);
148+
DataSourceBuilder configBuilder = create().shutdownOnJvmExit(true).validateOnHeartbeat(false);
149149
DataSourceConfig readOnly2 = readOnly.setDefaults(configBuilder);
150150

151151
assertThat(readOnly2).isSameAs(readOnly);

ebean-datasource/src/test/java/io/ebean/datasource/pool/DataSourcePoolFactoryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void createPool_forLambda() throws Exception {
4040
.url("jdbc:h2:mem:factory2")
4141
.username("sa")
4242
.password("")
43-
.lambdaMode(true)
43+
.validateOnHeartbeat(false)
4444
// .trimPoolFreqSecs(-1) // stop the heartbeat and reduce LAMBDA_MILLIS to 1100
4545
.build();
4646

0 commit comments

Comments
 (0)