Class PingOptions

java.lang.Object
com.couchbase.client.java.diagnostics.PingOptions

public class PingOptions
extends Object
Allows to customize a cluster or bucket level ping operation.
  • Method Details

    • pingOptions

      public static PingOptions pingOptions()
      Creates a new set of PingOptions.
      Returns:
      options to customize.
    • reportId

      public PingOptions reportId​(String reportId)
      Sets a custom report ID that will be used in the report.

      If no report ID is provided, the client will generate a unique one.

      Parameters:
      reportId - the report ID that should be used for this report.
      Returns:
      the PingOptions to allow method chaining.
    • serviceTypes

      public PingOptions serviceTypes​(Set<ServiceType> serviceTypes)
      Allows to customize the set of services to ping.

      If this method is not called, all available services are included in the ping.

      Parameters:
      serviceTypes - the service types that should be pinged.
      Returns:
      the PingOptions to allow method chaining.
    • serviceTypes

      public PingOptions serviceTypes​(ServiceType... serviceTypes)
      Allows to customize the set of services to ping.

      If this method is not called, all available services are included in the ping.

      Parameters:
      serviceTypes - the service types that should be pinged.
      Returns:
      the PingOptions to allow method chaining.
    • timeout

      public PingOptions timeout​(Duration timeout)
      Specifies a custom per-operation timeout.

      Note: if a custom timeout is provided through this builder, it will override the default set on the environment.

      Parameters:
      timeout - the timeout to use for this operation.
      Returns:
      this options builder for chaining purposes.
    • retryStrategy

      public PingOptions retryStrategy​(RetryStrategy retryStrategy)
      Specifies a custom RetryStrategy for this operation.

      Note: if a custom strategy is provided through this builder, it will override the default set on the environment.

      Parameters:
      retryStrategy - the retry strategy to use for this operation.
      Returns:
      this options builder for chaining purposes.
    • build

      @Internal public PingOptions.Built build()