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 "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 Details

    • CentralDogmaSettings

      public CentralDogmaSettings()
  • Method Details

    • getProfile

      @Nullable public String getProfile()
      Returns the Central Dogma client profile name.
      Returns:
      null if not specified.
    • setProfile

      public void setProfile(@NotBlank @NotBlank String profile)
      Sets the Central Dogma client profile name.
    • getHosts

      @Nullable public List<String> getHosts()
      Returns the list of Central Dogma hosts.
      Returns:
      null if not specified.
    • setHosts

      public void setHosts(@NotEmpty @NotEmpty List<String> hosts)
      Sets the list of Central Dogma hosts.
    • getAccessToken

      @Nullable public String getAccessToken()
      Returns the access token which is used to authenticate the Central Dogma client.
      Returns:
      null if not specified.
    • setAccessToken

      public void setAccessToken(@NotBlank @NotBlank String accessToken)
      Sets the access token which is used to authenticate the Central Dogma client.
    • getHealthCheckIntervalMillis

      @Nullable public Long 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

      @Nullable public Boolean 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

      @Nullable public Integer getMaxNumRetriesOnReplicationLag()
      Returns the maximum number of retries to perform when replication lag is detected.
      Returns:
      null if not specified.
    • setMaxNumRetriesOnReplicationLag

      public void setMaxNumRetriesOnReplicationLag(@Nullable Integer maxNumRetriesOnReplicationLag)
      Sets the maximum number of retries to perform when replication lag is detected.
    • getRetryIntervalOnReplicationLagMillis

      @Nullable public Long 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.
    • initializationTimeoutMillis

      @Nullable public Long initializationTimeoutMillis()
      Returns the number of milliseconds the Central Dogma client waits for initialization to complete. If 0 is specified, Central Dogma client is immediately returned without waiting.
      Returns:
      null if not specified.
    • setInitializationTimeoutMillis

      public void setInitializationTimeoutMillis(@Nullable Long initializationTimeoutMillis)
      Returns the number of milliseconds the Central Dogma client waits for initialization to complete. If 0 is specified, the Central Dogma client is immediately returned without waiting. If unspecified, defaults to 15000L.
    • toString

      public String toString()
      Overrides:
      toString in class Object