public static final class SubscriberShutdownSettings.BuilderBuilder for SubscriberShutdownSettings.
Methods
build()
public SubscriberShutdownSettings build()Builds an instance of SubscriberShutdownSettings.
| Returns | |
|---|---|
| Type | Description |
SubscriberShutdownSettings |
|
setMode(SubscriberShutdownSettings.ShutdownMode mode)
public SubscriberShutdownSettings.Builder setMode(SubscriberShutdownSettings.ShutdownMode mode)Sets the shutdown mode. Defaults to ShutdownMode#WAIT_FOR_PROCESSING.
| Parameter | |
|---|---|
| Name | Description |
mode |
SubscriberShutdownSettings.ShutdownMode |
| Returns | |
|---|---|
| Type | Description |
SubscriberShutdownSettings.Builder |
|
setTimeout(Duration timeout)
public SubscriberShutdownSettings.Builder setTimeout(Duration timeout)Sets the shutdown timeout. Defaults to a negative duration, indicating no timeout.
A positive duration specifies the maximum time to wait for shutdown to complete. A duration of zero indicates an immediate, forceful shutdown. A negative duration indicates an indefinite wait.
| Parameter | |
|---|---|
| Name | Description |
timeout |
Duration |
| Returns | |
|---|---|
| Type | Description |
SubscriberShutdownSettings.Builder |
|