# Interface RetryOrBuilder (0.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.16.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.deploy.v1.RetryOrBuilder)
- [0.15.0](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.deploy.v1.RetryOrBuilder)
- [0.14.1](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.deploy.v1.RetryOrBuilder)

    public interface RetryOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getAttempts()

    public abstract long getAttempts()

Required. Total number of retries. Retry is skipped if set to 0; The
minimum value is 1, and the maximum value is 10.

`int64 attempts = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The attempts. |

### getBackoffMode()

    public abstract BackoffMode getBackoffMode()

Optional. The pattern of how wait time will be increased. Default is
linear. Backoff mode will be ignored if `wait` is 0.

`.google.events.cloud.deploy.v1.BackoffMode backoff_mode = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.deploy.v1.BackoffMode` | The backoffMode. |

### getBackoffModeValue()

    public abstract int getBackoffModeValue()

Optional. The pattern of how wait time will be increased. Default is
linear. Backoff mode will be ignored if `wait` is 0.

`.google.events.cloud.deploy.v1.BackoffMode backoff_mode = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for backoffMode. |

### getWait()

    public abstract Duration getWait()

Optional. How long to wait for the first retry. Default is 0, and the
maximum value is 14d.

`.google.protobuf.Duration wait = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Duration.html` | The wait. |

### getWaitOrBuilder()

    public abstract DurationOrBuilder getWaitOrBuilder()

Optional. How long to wait for the first retry. Default is 0, and the
maximum value is 14d.

`.google.protobuf.Duration wait = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.DurationOrBuilder.html` |   |

### hasWait()

    public abstract boolean hasWait()

Optional. How long to wait for the first retry. Default is 0, and the
maximum value is 14d.

`.google.protobuf.Duration wait = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the wait field is set. |