.class public final Lrx/internal/producers/SingleDelayedProducer; .super Ljava/util/concurrent/atomic/AtomicInteger; .source "SingleDelayedProducer.java" # interfaces .implements Lrx/Producer; # annotations .annotation system Ldalvik/annotation/Signature; value = { "", "Ljava/util/concurrent/atomic/AtomicInteger;", "Lrx/Producer;" } .end annotation # static fields .field static final HAS_REQUEST_HAS_VALUE:I = 0x3 .field static final HAS_REQUEST_NO_VALUE:I = 0x2 .field static final NO_REQUEST_HAS_VALUE:I = 0x1 .field static final NO_REQUEST_NO_VALUE:I = 0x0 .field private static final serialVersionUID:J = -0x27e09bdfa51658b2L # instance fields .field final child:Lrx/Subscriber; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/Subscriber", "<-TT;>;" } .end annotation .end field .field value:Ljava/lang/Object; .annotation system Ldalvik/annotation/Signature; value = { "TT;" } .end annotation .end field # direct methods .method public constructor (Lrx/Subscriber;)V .locals 0 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lrx/Subscriber", "<-TT;>;)V" } .end annotation .prologue .local p0, "this":Lrx/internal/producers/SingleDelayedProducer;, "Lrx/internal/producers/SingleDelayedProducer;" .local p1, "child":Lrx/Subscriber;, "Lrx/Subscriber<-TT;>;" invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->()V iput-object p1, p0, Lrx/internal/producers/SingleDelayedProducer;->child:Lrx/Subscriber; return-void .end method .method private static emit(Lrx/Subscriber;Ljava/lang/Object;)V .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lrx/Subscriber", "<-TT;>;TT;)V" } .end annotation .prologue .local p0, "c":Lrx/Subscriber;, "Lrx/Subscriber<-TT;>;" .local p1, "v":Ljava/lang/Object;, "TT;" invoke-virtual {p0}, Lrx/Subscriber;->isUnsubscribed()Z move-result v1 if-eqz v1, :cond_1 :cond_0 :goto_0 return-void :cond_1 :try_start_0 invoke-virtual {p0, p1}, Lrx/Subscriber;->onNext(Ljava/lang/Object;)V :try_end_0 .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0 invoke-virtual {p0}, Lrx/Subscriber;->isUnsubscribed()Z move-result v1 if-nez v1, :cond_0 invoke-virtual {p0}, Lrx/Subscriber;->onCompleted()V goto :goto_0 :catch_0 move-exception v0 .local v0, "e":Ljava/lang/Throwable; invoke-static {v0, p0, p1}, Lrx/exceptions/Exceptions;->throwOrReport(Ljava/lang/Throwable;Lrx/Observer;Ljava/lang/Object;)V goto :goto_0 .end method # virtual methods .method public request(J)V .locals 7 .param p1, "n" # J .prologue .local p0, "this":Lrx/internal/producers/SingleDelayedProducer;, "Lrx/internal/producers/SingleDelayedProducer;" const-wide/16 v4, 0x0 const/4 v3, 0x1 cmp-long v1, p1, v4 if-gez v1, :cond_0 new-instance v1, Ljava/lang/IllegalArgumentException; const-string v2, "n >= 0 required" invoke-direct {v1, v2}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw v1 :cond_0 cmp-long v1, p1, v4 if-nez v1, :cond_2 :cond_1 :goto_0 return-void :cond_2 :goto_1 invoke-virtual {p0}, Lrx/internal/producers/SingleDelayedProducer;->get()I move-result v0 .local v0, "s":I if-nez v0, :cond_3 const/4 v1, 0x0 const/4 v2, 0x2 invoke-virtual {p0, v1, v2}, Lrx/internal/producers/SingleDelayedProducer;->compareAndSet(II)Z move-result v1 if-nez v1, :cond_1 goto :goto_1 :cond_3 if-ne v0, v3, :cond_1 const/4 v1, 0x3 invoke-virtual {p0, v3, v1}, Lrx/internal/producers/SingleDelayedProducer;->compareAndSet(II)Z move-result v1 if-eqz v1, :cond_1 iget-object v1, p0, Lrx/internal/producers/SingleDelayedProducer;->child:Lrx/Subscriber; iget-object v2, p0, Lrx/internal/producers/SingleDelayedProducer;->value:Ljava/lang/Object; invoke-static {v1, v2}, Lrx/internal/producers/SingleDelayedProducer;->emit(Lrx/Subscriber;Ljava/lang/Object;)V goto :goto_0 .end method .method public setValue(Ljava/lang/Object;)V .locals 4 .annotation system Ldalvik/annotation/Signature; value = { "(TT;)V" } .end annotation .prologue .local p0, "this":Lrx/internal/producers/SingleDelayedProducer;, "Lrx/internal/producers/SingleDelayedProducer;" .local p1, "value":Ljava/lang/Object;, "TT;" const/4 v3, 0x2 :cond_0 invoke-virtual {p0}, Lrx/internal/producers/SingleDelayedProducer;->get()I move-result v0 .local v0, "s":I if-nez v0, :cond_2 iput-object p1, p0, Lrx/internal/producers/SingleDelayedProducer;->value:Ljava/lang/Object; const/4 v1, 0x0 const/4 v2, 0x1 invoke-virtual {p0, v1, v2}, Lrx/internal/producers/SingleDelayedProducer;->compareAndSet(II)Z move-result v1 if-eqz v1, :cond_0 :cond_1 :goto_0 return-void :cond_2 if-ne v0, v3, :cond_1 const/4 v1, 0x3 invoke-virtual {p0, v3, v1}, Lrx/internal/producers/SingleDelayedProducer;->compareAndSet(II)Z move-result v1 if-eqz v1, :cond_1 iget-object v1, p0, Lrx/internal/producers/SingleDelayedProducer;->child:Lrx/Subscriber; invoke-static {v1, p1}, Lrx/internal/producers/SingleDelayedProducer;->emit(Lrx/Subscriber;Ljava/lang/Object;)V goto :goto_0 .end method