Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rxjava3 version 3.1.1 with classes moved to non internal packages #254

Merged
merged 3 commits into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

<rxjava.version>2.2.21</rxjava.version>
<reactor.version>3.4.7</reactor.version>
<rx3java.version>3.0.5</rx3java.version>
<rx3java.version>3.1.1</rx3java.version>

<!-- Test Dependency Versions -->
<grpc.contrib.version>0.8.1</grpc.contrib.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import com.salesforce.reactivegrpc.common.FusionModeAwareSubscription;

import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.internal.fuseable.QueueSubscription;
import io.reactivex.rxjava3.operators.QueueSubscription;

/**
* Implementation of FusionModeAwareSubscription which encapsulate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import com.salesforce.reactivegrpc.common.Consumer;

import io.grpc.stub.CallStreamObserver;
import io.reactivex.rxjava3.internal.fuseable.QueueFuseable;
import io.reactivex.rxjava3.internal.fuseable.QueueSubscription;
import io.reactivex.rxjava3.internal.queue.SpscArrayQueue;
import io.reactivex.rxjava3.operators.QueueFuseable;
import io.reactivex.rxjava3.operators.QueueSubscription;
import io.reactivex.rxjava3.operators.SpscArrayQueue;

/**
* TODO: Explain what this class does.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

import io.grpc.stub.CallStreamObserver;
import io.grpc.stub.ServerCallStreamObserver;
import io.reactivex.rxjava3.internal.fuseable.QueueFuseable;
import io.reactivex.rxjava3.internal.fuseable.QueueSubscription;
import io.reactivex.rxjava3.internal.queue.SpscArrayQueue;
import io.reactivex.rxjava3.operators.QueueFuseable;
import io.reactivex.rxjava3.operators.QueueSubscription;
import io.reactivex.rxjava3.operators.SpscArrayQueue;

/**
* TODO: Explain what this class does.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.salesforce.reactivegrpc.common.AbstractSubscriberAndClientProducer;

import io.reactivex.rxjava3.core.FlowableSubscriber;
import io.reactivex.rxjava3.internal.fuseable.QueueSubscription;
import io.reactivex.rxjava3.operators.QueueSubscription;

/**
* The gRPC client-side implementation of {@link com.salesforce.reactivegrpc.common.AbstractSubscriberAndProducer}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.salesforce.reactivegrpc.common.AbstractSubscriberAndServerProducer;

import io.reactivex.rxjava3.core.FlowableSubscriber;
import io.reactivex.rxjava3.internal.fuseable.QueueSubscription;
import io.reactivex.rxjava3.operators.QueueSubscription;

/**
* The gRPC server-side implementation of {@link com.salesforce.reactivegrpc.common.AbstractSubscriberAndProducer}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import com.salesforce.reactivegrpc.common.AbstractUnimplementedQueue;

import io.reactivex.rxjava3.internal.fuseable.SimplePlainQueue;
import io.reactivex.rxjava3.operators.SimplePlainQueue;

/**
* Adapts the RxJava {@code SimpleQueue} interface to a common java {@link java.util.Queue}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import io.reactivex.rxjava3.functions.Consumer;
import io.reactivex.rxjava3.functions.Function;
import io.reactivex.rxjava3.functions.Predicate;
import io.reactivex.rxjava3.internal.functions.Functions;
import io.reactivex.rxjava3.schedulers.Schedulers;

/**
Expand Down Expand Up @@ -198,9 +197,15 @@ public static Builder exponentialBackoff(long firstDelay, TimeUnit unit) {

public static final class Builder {

static final class TruePredicate implements Predicate<Object> {
@Override
public boolean test(Object o) {
return true;
}
}
private final List<Class<? extends Throwable>> retryExceptions = new ArrayList<Class<? extends Throwable>>();
private final List<Class<? extends Throwable>> failExceptions = new ArrayList<Class<? extends Throwable>>();
private Predicate<? super Throwable> exceptionPredicate = Functions.alwaysTrue();
private Predicate<? super Throwable> exceptionPredicate = new TruePredicate();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this just be private Predicate<? super Throwable> exceptionPredicate = x -> true;


private Flowable<Long> delays = Flowable.just(0L).repeat();
private Optional<Integer> maxRetries = Optional.absent();
Expand Down