You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by he...@apache.org on 2025/09/13 04:55:44 UTC
(pekko) branch jfunction created (now 12ca4d4e62)
This is an automated email from the ASF dual-hosted git repository.
hepin pushed a change to branch jfunction
in repository https://gitbox.apache.org/repos/asf/pekko.git
at 12ca4d4e62 chore: Make use of japi.funtion.* in Patterns
This branch includes the following new commits:
new 12ca4d4e62 chore: Make use of japi.funtion.* in Patterns
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org
(pekko) 01/01: chore: Make use of japi.funtion.* in Patterns
Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hepin pushed a commit to branch jfunction
in repository https://gitbox.apache.org/repos/asf/pekko.git
commit 12ca4d4e6206fa4359a74f1f9038574a22c1fa6c
Author: He-Pin <he...@gmail.com>
AuthorDate: Sat Sep 13 12:55:34 2025 +0800
chore: Make use of japi.funtion.* in Patterns
---
.../src/main/scala/org/apache/pekko/pattern/Patterns.scala | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala b/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala
index 2465aeccd8..b20e37cb9d 100644
--- a/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala
+++ b/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala
@@ -15,7 +15,6 @@ package org.apache.pekko.pattern
import java.util.Optional
import java.util.concurrent.{ Callable, CompletionStage, TimeUnit }
-import java.util.function.BiPredicate
import scala.concurrent.ExecutionContext
@@ -518,7 +517,7 @@ object Patterns {
*/
def retry[T](
attempt: Callable[CompletionStage[T]],
- shouldRetry: BiPredicate[T, Throwable],
+ shouldRetry: japi.function.Predicate2[T, Throwable],
attempts: Int,
ec: ExecutionContext): CompletionStage[T] = {
require(attempt != null, "Parameter attempt should not be null.")
@@ -585,7 +584,7 @@ object Patterns {
*/
def retry[T](
attempt: Callable[CompletionStage[T]],
- shouldRetry: BiPredicate[T, Throwable],
+ shouldRetry: japi.function.Predicate2[T, Throwable],
attempts: Int,
minBackoff: java.time.Duration,
maxBackoff: java.time.Duration,
@@ -662,7 +661,7 @@ object Patterns {
*/
def retry[T](
attempt: Callable[CompletionStage[T]],
- shouldRetry: BiPredicate[T, Throwable],
+ shouldRetry: japi.function.Predicate2[T, Throwable],
attempts: Int,
minBackoff: java.time.Duration,
maxBackoff: java.time.Duration,
@@ -738,7 +737,7 @@ object Patterns {
*/
def retry[T](
attempt: Callable[CompletionStage[T]],
- shouldRetry: BiPredicate[T, Throwable],
+ shouldRetry: japi.function.Predicate2[T, Throwable],
attempts: Int,
delay: java.time.Duration,
system: ClassicActorSystemProvider): CompletionStage[T] =
@@ -787,7 +786,7 @@ object Patterns {
*/
def retry[T](
attempt: Callable[CompletionStage[T]],
- shouldRetry: BiPredicate[T, Throwable],
+ shouldRetry: japi.function.Predicate2[T, Throwable],
attempts: Int,
delay: java.time.Duration,
scheduler: Scheduler,
@@ -852,7 +851,7 @@ object Patterns {
*/
def retry[T](
attempt: Callable[CompletionStage[T]],
- shouldRetry: BiPredicate[T, Throwable],
+ shouldRetry: japi.function.Predicate2[T, Throwable],
attempts: Int,
delayFunction: java.util.function.IntFunction[Optional[java.time.Duration]],
scheduler: Scheduler,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org