Class CentralDogmaSettings
java.lang.Object
com.linecorp.centraldogma.client.spring.CentralDogmaSettings
@ConfigurationProperties(prefix="centraldogma")
@Validated
public class CentralDogmaSettings
extends Object
Settings for a Central Dogma client.
Example with
Example with
Example with "hosts"
option
centraldogma:
hosts:
- replica1.examples.com:36462
- replica2.examples.com:36462
- replica3.examples.com:36462
access-token: appToken-cffed349-d573-457f-8f74-4727ad9341ce
health-check-interval-millis: 15000
initialization-timeout-millis: 15000
use-tls: false
Example with "profile"
option
centraldogma:
profile: beta
access-token: appToken-cffed349-d573-457f-8f74-4727ad9341ce
health-check-interval-millis: 15000
initialization-timeout-millis: 15000
use-tls: false
Note that "healthCheckIntervalMillis"
and "useTls"
are optional.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the access token which is used to authenticate the Central Dogma client.Returns the number of milliseconds between each health-check requests to Central Dogma servers.getHosts()
Returns the list of Central Dogma hosts.Returns the number of milliseconds the Central Dogma client waits for initialization to complete.Returns the maximum number of retries to perform when replication lag is detected.Returns the Central Dogma client profile name.Returns the number of milliseconds between retries which occurred due to replication lag.Returns whether to use a TLS connection when communicating with a Central Dogma server.void
setAccessToken
(@NotBlank String accessToken) Sets the access token which is used to authenticate the Central Dogma client.void
setHealthCheckIntervalMillis
(@javax.validation.constraints.PositiveOrZero long healthCheckIntervalMillis) Sets the number of milliseconds between each health-check requests to Central Dogma servers.void
Sets the list of Central Dogma hosts.void
setInitializationTimeoutMillis
(Long initializationTimeoutMillis) Returns the number of milliseconds the Central Dogma client waits for initialization to complete.void
setMaxNumRetriesOnReplicationLag
(Integer maxNumRetriesOnReplicationLag) Sets the maximum number of retries to perform when replication lag is detected.void
setProfile
(@NotBlank String profile) Sets the Central Dogma client profile name.void
setRetryIntervalOnReplicationLagMillis
(Long retryIntervalOnReplicationLagMillis) Sets the number of milliseconds between retries which occurred due to replication lag.void
setUseTls
(boolean useTls) Sets whether to use a TLS connection when communicating with a Central Dogma server.toString()
-
Constructor Details
-
CentralDogmaSettings
public CentralDogmaSettings()
-
-
Method Details
-
getProfile
Returns the Central Dogma client profile name.- Returns:
null
if not specified.
-
setProfile
Sets the Central Dogma client profile name. -
getHosts
Returns the list of Central Dogma hosts.- Returns:
null
if not specified.
-
setHosts
Sets the list of Central Dogma hosts. -
getAccessToken
Returns the access token which is used to authenticate the Central Dogma client.- Returns:
null
if not specified.
-
setAccessToken
Sets the access token which is used to authenticate the Central Dogma client. -
getHealthCheckIntervalMillis
Returns the number of milliseconds between each health-check requests to Central Dogma servers.- Returns:
null
if not specified.
-
setHealthCheckIntervalMillis
public void setHealthCheckIntervalMillis(@PositiveOrZero @javax.validation.constraints.PositiveOrZero long healthCheckIntervalMillis) Sets the number of milliseconds between each health-check requests to Central Dogma servers. -
getUseTls
Returns whether to use a TLS connection when communicating with a Central Dogma server.- Returns:
null
if not specified.
-
setUseTls
public void setUseTls(boolean useTls) Sets whether to use a TLS connection when communicating with a Central Dogma server. -
getMaxNumRetriesOnReplicationLag
Returns the maximum number of retries to perform when replication lag is detected.- Returns:
null
if not specified.
-
setMaxNumRetriesOnReplicationLag
Sets the maximum number of retries to perform when replication lag is detected. -
getRetryIntervalOnReplicationLagMillis
Returns the number of milliseconds between retries which occurred due to replication lag.- Returns:
null
if not specified.
-
setRetryIntervalOnReplicationLagMillis
public void setRetryIntervalOnReplicationLagMillis(@Nullable Long retryIntervalOnReplicationLagMillis) Sets the number of milliseconds between retries which occurred due to replication lag. -
getInitializationTimeoutMillis
Returns the number of milliseconds the Central Dogma client waits for initialization to complete. If0
is specified, Central Dogma client is immediately returned without waiting.- Returns:
null
if not specified.
-
setInitializationTimeoutMillis
Returns the number of milliseconds the Central Dogma client waits for initialization to complete. If0
is specified, the Central Dogma client is immediately returned without waiting. If unspecified, defaults to 15000L. -
toString
-