Class PagedCallSettings.Builder<RequestT,ResponseT,PagedListResponseT> (2.54.1)

public static class PagedCallSettings.Builder<RequestT,ResponseT,PagedListResponseT> extends UnaryCallSettings.Builder<RequestT,ResponseT>

Inheritance

java.lang.Object > UnaryCallSettings.Builder > PagedCallSettings.Builder<RequestT,ResponseT,PagedListResponseT>

Type Parameters

Name Description
RequestT
ResponseT
PagedListResponseT

Constructors

Builder(PagedCallSettings<RequestT,ResponseT,PagedListResponseT> settings)

public Builder(PagedCallSettings<RequestT,ResponseT,PagedListResponseT> settings)
Parameter
Name Description
settings PagedCallSettings<RequestT,ResponseT,PagedListResponseT>

Builder(PagedListResponseFactory<RequestT,ResponseT,PagedListResponseT> pagedListResponseFactory)

public Builder(PagedListResponseFactory<RequestT,ResponseT,PagedListResponseT> pagedListResponseFactory)
Parameter
Name Description
pagedListResponseFactory PagedListResponseFactory<RequestT,ResponseT,PagedListResponseT>

Methods

build()

public PagedCallSettings<RequestT,ResponseT,PagedListResponseT> build()

Builds an instance of the containing class. This operation is unsupported on the abstract base class UnaryCallSettings, but is valid on concrete derived classes.

Returns
Type Description
PagedCallSettings<RequestT,ResponseT,PagedListResponseT>
Overrides

getPagedListResponseFactory()

public PagedListResponseFactory<RequestT,ResponseT,PagedListResponseT> getPagedListResponseFactory()
Returns
Type Description
PagedListResponseFactory<RequestT,ResponseT,PagedListResponseT>

setRetrySettings(RetrySettings retrySettings)

public PagedCallSettings.Builder<RequestT,ResponseT,PagedListResponseT> setRetrySettings(RetrySettings retrySettings)

Replaces the RetrySettings for the associated UnaryCallable.

When using the method, make sure that the RetrySettings are complete. For example, the following code will disable retries because the retry delay is not set:


 stubSettings.setRetrySettings(
   RetrySettings.newBuilder()
     .setTotalTimeout(Duration.ofSeconds(10)
 );
 
Parameter
Name Description
retrySettings RetrySettings
Returns
Type Description
Builder<RequestT,ResponseT,PagedListResponseT>
Overrides

setRetryableCodes(StatusCode.Code[] codes)

public PagedCallSettings.Builder<RequestT,ResponseT,PagedListResponseT> setRetryableCodes(StatusCode.Code[] codes)

See the class documentation of UnaryCallSettings for a description of what retryable codes do.

Parameter
Name Description
codes Code[]
Returns
Type Description
Builder<RequestT,ResponseT,PagedListResponseT>
Overrides

setRetryableCodes(Set<StatusCode.Code> retryableCodes)

public PagedCallSettings.Builder<RequestT,ResponseT,PagedListResponseT> setRetryableCodes(Set<StatusCode.Code> retryableCodes)

See the class documentation of UnaryCallSettings for a description of what retryable codes do.

Parameter
Name Description
retryableCodes Set<Code>
Returns
Type Description
Builder<RequestT,ResponseT,PagedListResponseT>
Overrides