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

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

NameDescription
RequestT
ResponseT
PagedListResponseT

Constructors

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

public Builder(PagedCallSettings<RequestT,ResponseT,PagedListResponseT> settings)
Parameter
NameDescription
settingsPagedCallSettings<RequestT,ResponseT,PagedListResponseT>

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

public Builder(PagedListResponseFactory<RequestT,ResponseT,PagedListResponseT> pagedListResponseFactory)
Parameter
NameDescription
pagedListResponseFactoryPagedListResponseFactory<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
TypeDescription
PagedCallSettings<RequestT,ResponseT,PagedListResponseT>
Overrides

getPagedListResponseFactory()

public PagedListResponseFactory<RequestT,ResponseT,PagedListResponseT> getPagedListResponseFactory()
Returns
TypeDescription
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
NameDescription
retrySettingsRetrySettings
Returns
TypeDescription
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
NameDescription
codesCode[]
Returns
TypeDescription
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
NameDescription
retryableCodesSet<Code>
Returns
TypeDescription
Builder<RequestT,ResponseT,PagedListResponseT>
Overrides