|
|
|
|
@ -21,6 +21,8 @@ import java.util.LinkedHashMap;
@@ -21,6 +21,8 @@ import java.util.LinkedHashMap;
|
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.UUID; |
|
|
|
|
|
|
|
|
|
import io.r2dbc.spi.ValidationDepth; |
|
|
|
|
|
|
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
@ -29,6 +31,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -29,6 +31,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
|
|
|
* @author Mark Paluch |
|
|
|
|
* @author Andreas Killaitis |
|
|
|
|
* @author Stephane Nicoll |
|
|
|
|
* @author Rodolpho S. Couto |
|
|
|
|
* @since 2.3.0 |
|
|
|
|
*/ |
|
|
|
|
@ConfigurationProperties(prefix = "spring.r2dbc") |
|
|
|
|
@ -138,6 +141,23 @@ public class R2dbcProperties {
@@ -138,6 +141,23 @@ public class R2dbcProperties {
|
|
|
|
|
*/ |
|
|
|
|
private Duration maxIdleTime = Duration.ofMinutes(30); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Maximum lifetime of a connection in the pool. By default, connections have an |
|
|
|
|
* infinite lifetime. |
|
|
|
|
*/ |
|
|
|
|
private Duration maxLifeTime; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Maximum time to acquire a connection from the pool. By default, wait |
|
|
|
|
* indefinitely. |
|
|
|
|
*/ |
|
|
|
|
private Duration maxAcquireTime; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Maximum time to wait to create a new connection. By default, wait indefinitely. |
|
|
|
|
*/ |
|
|
|
|
private Duration maxCreateConnectionTime; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Initial connection pool size. |
|
|
|
|
*/ |
|
|
|
|
@ -153,6 +173,11 @@ public class R2dbcProperties {
@@ -153,6 +173,11 @@ public class R2dbcProperties {
|
|
|
|
|
*/ |
|
|
|
|
private String validationQuery; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Validation depth. |
|
|
|
|
*/ |
|
|
|
|
private ValidationDepth validationDepth = ValidationDepth.LOCAL; |
|
|
|
|
|
|
|
|
|
public Duration getMaxIdleTime() { |
|
|
|
|
return this.maxIdleTime; |
|
|
|
|
} |
|
|
|
|
@ -161,6 +186,30 @@ public class R2dbcProperties {
@@ -161,6 +186,30 @@ public class R2dbcProperties {
|
|
|
|
|
this.maxIdleTime = maxIdleTime; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Duration getMaxLifeTime() { |
|
|
|
|
return this.maxLifeTime; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setMaxLifeTime(Duration maxLifeTime) { |
|
|
|
|
this.maxLifeTime = maxLifeTime; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Duration getMaxAcquireTime() { |
|
|
|
|
return this.maxAcquireTime; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setMaxAcquireTime(Duration maxAcquireTime) { |
|
|
|
|
this.maxAcquireTime = maxAcquireTime; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Duration getMaxCreateConnectionTime() { |
|
|
|
|
return this.maxCreateConnectionTime; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setMaxCreateConnectionTime(Duration maxCreateConnectionTime) { |
|
|
|
|
this.maxCreateConnectionTime = maxCreateConnectionTime; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public int getInitialSize() { |
|
|
|
|
return this.initialSize; |
|
|
|
|
} |
|
|
|
|
@ -185,6 +234,14 @@ public class R2dbcProperties {
@@ -185,6 +234,14 @@ public class R2dbcProperties {
|
|
|
|
|
this.validationQuery = validationQuery; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public ValidationDepth getValidationDepth() { |
|
|
|
|
return this.validationDepth; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setValidationDepth(ValidationDepth validationDepth) { |
|
|
|
|
this.validationDepth = validationDepth; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|