mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-12 17:07:17 +01:00
66 lines
2.2 KiB
Java
66 lines
2.2 KiB
Java
package rx;
|
|
|
|
import rx.annotations.Experimental;
|
|
import rx.exceptions.MissingBackpressureException;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Experimental
|
|
/* loaded from: classes12.dex */
|
|
public final class BackpressureOverflow {
|
|
public static final Strategy ON_OVERFLOW_DEFAULT;
|
|
public static final Strategy ON_OVERFLOW_DROP_LATEST;
|
|
public static final Strategy ON_OVERFLOW_DROP_OLDEST;
|
|
public static final Strategy ON_OVERFLOW_ERROR;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
public static class DropLatest implements Strategy {
|
|
static final DropLatest INSTANCE = new DropLatest();
|
|
|
|
private DropLatest() {
|
|
}
|
|
|
|
@Override // rx.BackpressureOverflow.Strategy
|
|
public boolean mayAttemptDrop() {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
public static class DropOldest implements Strategy {
|
|
static final DropOldest INSTANCE = new DropOldest();
|
|
|
|
private DropOldest() {
|
|
}
|
|
|
|
@Override // rx.BackpressureOverflow.Strategy
|
|
public boolean mayAttemptDrop() {
|
|
return true;
|
|
}
|
|
}
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
public static class Error implements Strategy {
|
|
static final Error INSTANCE = new Error();
|
|
|
|
private Error() {
|
|
}
|
|
|
|
@Override // rx.BackpressureOverflow.Strategy
|
|
public boolean mayAttemptDrop() throws MissingBackpressureException {
|
|
throw new MissingBackpressureException("Overflowed buffer");
|
|
}
|
|
}
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
public interface Strategy {
|
|
boolean mayAttemptDrop() throws MissingBackpressureException;
|
|
}
|
|
|
|
static {
|
|
Error error = Error.INSTANCE;
|
|
ON_OVERFLOW_ERROR = error;
|
|
ON_OVERFLOW_DEFAULT = error;
|
|
ON_OVERFLOW_DROP_OLDEST = DropOldest.INSTANCE;
|
|
ON_OVERFLOW_DROP_LATEST = DropLatest.INSTANCE;
|
|
}
|
|
}
|