Package io.dapr.internal.resiliency

# Class TimeoutPolicy

java.lang.Object
io.dapr.internal.resiliency.TimeoutPolicy

public final class TimeoutPolicy extends Object
Timeout policy for SDK communication to Dapr API.

## Constructor Summary

Constructors
Constructor
Description
`TimeoutPolicy()`
Instantiates a new timeout policy with default value.
`TimeoutPolicy(Duration timeout)`
Instantiates a new timeout policy with override value.

## Method Summary

Modifier and Type
Method
Description
`io.grpc.CallOptions`
`apply(io.grpc.CallOptions options)`
Applies the timeout policy to a gRPC call options.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### TimeoutPolicy

public TimeoutPolicy(Duration timeout)
Instantiates a new timeout policy with override value.

Parameters:
  `timeout` - Override timeout value.

### TimeoutPolicy

public TimeoutPolicy()
Instantiates a new timeout policy with default value.

## Method Details

### apply

public io.grpc.CallOptions apply(io.grpc.CallOptions options)
Applies the timeout policy to a gRPC call options.

Parameters:
  `options` - Call options
Returns:
  Call options with retry policy applied