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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
PingOptions.Built
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PingOptions.Built
build()
static PingOptions
pingOptions()
Creates a new set ofPingOptions
.PingOptions
reportId(String reportId)
Sets a custom report ID that will be used in the report.PingOptions
retryStrategy(RetryStrategy retryStrategy)
Specifies a customRetryStrategy
for this operation.PingOptions
serviceTypes(Set<ServiceType> serviceTypes)
Allows to customize the set of services to pingPingOptions
timeout(Duration timeout)
Specifies a custom per-operation timeout.
-
-
-
Method Detail
-
pingOptions
public static PingOptions pingOptions()
Creates a new set ofPingOptions
.- 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 pingIf no set is provided, all possible services are pinged
- 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 customRetryStrategy
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()
-
-