Searched refs:resultAlgorithm (Results 1 – 5 of 5) sorted by relevance
/external/sdk-platform-java/gax-java/gax/src/test/java/com/google/api/gax/retrying/ |
D | RetryAlgorithmTest.java | 89 ResultRetryAlgorithm<Object> resultAlgorithm = mock(ResultRetryAlgorithm.class); in testNextAttempt() local 91 RetryAlgorithm<Object> algorithm = new RetryAlgorithm<>(resultAlgorithm, timedAlgorithm); in testNextAttempt() 98 verify(resultAlgorithm).shouldRetry(previousThrowable, previousResult); in testNextAttempt() 103 ResultRetryAlgorithmWithContext<Object> resultAlgorithm = in testNextAttemptWithContext() local 106 RetryAlgorithm<Object> algorithm = new RetryAlgorithm<>(resultAlgorithm, timedAlgorithm); in testNextAttemptWithContext() 114 verify(resultAlgorithm).shouldRetry(context, previousThrowable, previousResult); in testNextAttemptWithContext() 119 ResultRetryAlgorithm<Object> resultAlgorithm = mock(ResultRetryAlgorithm.class); in testShouldRetry() local 121 RetryAlgorithm<Object> algorithm = new RetryAlgorithm<>(resultAlgorithm, timedAlgorithm); in testShouldRetry() 128 verify(resultAlgorithm).shouldRetry(previousThrowable, previousResult); in testShouldRetry() 133 ResultRetryAlgorithm<Object> resultAlgorithm = mock(ResultRetryAlgorithm.class); in testShouldRetry_usesTimedAlgorithm() local [all …]
|
/external/sdk-platform-java/gax-java/gax/src/test/java/com/google/api/gax/rpc/ |
D | StreamingRetryAlgorithmTest.java | 80 BasicResultRetryAlgorithm<String> resultAlgorithm = new BasicResultRetryAlgorithm<>(); in testFirstAttemptUsesDefaultSettings() local 85 new StreamingRetryAlgorithm<>(resultAlgorithm, timedAlgorithm); in testFirstAttemptUsesDefaultSettings() 96 BasicResultRetryAlgorithm<String> resultAlgorithm = new BasicResultRetryAlgorithm<>(); in testFirstAttemptUsesContextSettings() local 101 new StreamingRetryAlgorithm<>(resultAlgorithm, timedAlgorithm); in testFirstAttemptUsesContextSettings() 112 BasicResultRetryAlgorithm<String> resultAlgorithm = mock(BasicResultRetryAlgorithm.class); in testNextAttemptReturnsNullWhenShouldNotRetry() local 114 when(resultAlgorithm.shouldRetry(context, exception, null)).thenReturn(false); in testNextAttemptReturnsNullWhenShouldNotRetry() 119 new StreamingRetryAlgorithm<>(resultAlgorithm, timedAlgorithm); in testNextAttemptReturnsNullWhenShouldNotRetry() 134 BasicResultRetryAlgorithm<String> resultAlgorithm = mock(BasicResultRetryAlgorithm.class); in testNextAttemptReturnsResultAlgorithmSettingsWhenShouldRetry() local 136 when(resultAlgorithm.shouldRetry(context, exception, null)).thenReturn(true); in testNextAttemptReturnsResultAlgorithmSettingsWhenShouldRetry() 138 when(resultAlgorithm.createNextAttempt( in testNextAttemptReturnsResultAlgorithmSettingsWhenShouldRetry() [all …]
|
/external/sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/retrying/ |
D | RetryAlgorithm.java | 46 private final ResultRetryAlgorithm<ResponseT> resultAlgorithm; field in RetryAlgorithm 68 ResultRetryAlgorithm<ResponseT> resultAlgorithm, TimedRetryAlgorithm timedAlgorithm) { in RetryAlgorithm() argument 69 this.resultAlgorithm = checkNotNull(resultAlgorithm); in RetryAlgorithm() 84 ResultRetryAlgorithmWithContext<ResponseT> resultAlgorithm, in RetryAlgorithm() argument 86 this.resultAlgorithm = null; in RetryAlgorithm() 88 this.resultAlgorithmWithContext = checkNotNull(resultAlgorithm); in RetryAlgorithm() 260 return resultAlgorithmWithContext != null ? resultAlgorithmWithContext : resultAlgorithm; in getResultAlgorithm()
|
D | StreamingRetryAlgorithm.java | 58 ResultRetryAlgorithm<ResponseT> resultAlgorithm, TimedRetryAlgorithm timedAlgorithm) { in StreamingRetryAlgorithm() argument 59 super(resultAlgorithm, timedAlgorithm); in StreamingRetryAlgorithm() 67 ResultRetryAlgorithmWithContext<ResponseT> resultAlgorithm, in StreamingRetryAlgorithm() argument 69 super(resultAlgorithm, timedAlgorithm); in StreamingRetryAlgorithm()
|
/external/sdk-platform-java/java-core/google-cloud-core/src/main/java/com/google/cloud/ |
D | RetryHelper.java | 70 ResultRetryAlgorithm<V> resultAlgorithm) in run() argument 72 RetryAlgorithm<V> retryAlgorithm = new RetryAlgorithm<>(resultAlgorithm, timedAlgorithm); in run()
|