SingleProducer.smali
.class public final Lrx/internal/producers/SingleProducer;
.super Ljava/util/concurrent/atomic/AtomicBoolean;
.source "SingleProducer.java"
# interfaces
.implements Lrx/i;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/util/concurrent/atomic/AtomicBoolean;",
"Lrx/i;"
}
.end annotation
# static fields
.field private static final serialVersionUID:J = -0x2e8a53b866dafe2cL
# instance fields
.field final child:Lrx/o;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/o",
"<-TT;>;"
}
.end annotation
.end field
.field final value:Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"TT;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lrx/o;Ljava/lang/Object;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/o",
"<-TT;>;TT;)V"
}
.end annotation
.prologue
.line 40
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>()V
.line 41
iput-object p1, p0, Lrx/internal/producers/SingleProducer;->child:Lrx/o;
.line 42
iput-object p2, p0, Lrx/internal/producers/SingleProducer;->value:Ljava/lang/Object;
.line 43
return-void
.end method
# virtual methods
.method public final request(J)V
.registers 8
.prologue
const-wide/16 v2, 0x0
.line 47
cmp-long v0, p1, v2
if-gez v0, :cond_e
.line 48
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string v1, "n >= 0 required"
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.line 51
:cond_e
cmp-long v0, p1, v2
if-nez v0, :cond_13
.line 77
:cond_12
:goto_12
return-void
.line 55
:cond_13
const/4 v0, 0x0
const/4 v1, 0x1
invoke-virtual {p0, v0, v1}, Lrx/internal/producers/SingleProducer;->compareAndSet(ZZ)Z
move-result v0
if-eqz v0, :cond_12
.line 57
iget-object v0, p0, Lrx/internal/producers/SingleProducer;->child:Lrx/o;
.line 59
invoke-virtual {v0}, Lrx/o;->isUnsubscribed()Z
move-result v1
if-nez v1, :cond_12
.line 62
iget-object v1, p0, Lrx/internal/producers/SingleProducer;->value:Ljava/lang/Object;
.line 65
:try_start_25
invoke-virtual {v0, v1}, Lrx/o;->onNext(Ljava/lang/Object;)V
:try_end_28
.catch Ljava/lang/Throwable; {:try_start_25 .. :try_end_28} :catch_32
.line 71
invoke-virtual {v0}, Lrx/o;->isUnsubscribed()Z
move-result v1
if-nez v1, :cond_12
.line 75
invoke-virtual {v0}, Lrx/o;->SG()V
goto :goto_12
.line 67
:catch_32
move-exception v2
invoke-static {v2, v0, v1}, Lrx/exceptions/d;->a(Ljava/lang/Throwable;Lrx/h;Ljava/lang/Object;)V
goto :goto_12
.end method