OperatorTakeTimed.smali
.class public final Lrx/internal/operators/OperatorTakeTimed;
.super Ljava/lang/Object;
.source "OperatorTakeTimed.java"
# interfaces
.implements Lrx/Observable$Operator;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lrx/internal/operators/OperatorTakeTimed$TakeSubscriber;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Lrx/Observable$Operator<",
"TT;TT;>;"
}
.end annotation
# instance fields
.field final scheduler:Lrx/Scheduler;
.field final time:J
.field final unit:Ljava/util/concurrent/TimeUnit;
# direct methods
.method public constructor <init>(JLjava/util/concurrent/TimeUnit;Lrx/Scheduler;)V
.registers 5
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-wide p1, p0, Lrx/internal/operators/OperatorTakeTimed;->time:J
.line 3
iput-object p3, p0, Lrx/internal/operators/OperatorTakeTimed;->unit:Ljava/util/concurrent/TimeUnit;
.line 4
iput-object p4, p0, Lrx/internal/operators/OperatorTakeTimed;->scheduler:Lrx/Scheduler;
return-void
.end method
# virtual methods
.method public bridge synthetic call(Ljava/lang/Object;)Ljava/lang/Object;
.registers 2
.line 1
check-cast p1, Lrx/Subscriber;
invoke-virtual {p0, p1}, Lrx/internal/operators/OperatorTakeTimed;->call(Lrx/Subscriber;)Lrx/Subscriber;
move-result-object p1
return-object p1
.end method
.method public call(Lrx/Subscriber;)Lrx/Subscriber;
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/Subscriber<",
"-TT;>;)",
"Lrx/Subscriber<",
"-TT;>;"
}
.end annotation
.line 2
iget-object v0, p0, Lrx/internal/operators/OperatorTakeTimed;->scheduler:Lrx/Scheduler;
invoke-virtual {v0}, Lrx/Scheduler;->createWorker()Lrx/Scheduler$Worker;
move-result-object v0
.line 3
invoke-virtual {p1, v0}, Lrx/Subscriber;->add(Lrx/Subscription;)V
.line 4
new-instance v1, Lrx/internal/operators/OperatorTakeTimed$TakeSubscriber;
new-instance v2, Lrx/observers/SerializedSubscriber;
invoke-direct {v2, p1}, Lrx/observers/SerializedSubscriber;-><init>(Lrx/Subscriber;)V
invoke-direct {v1, v2}, Lrx/internal/operators/OperatorTakeTimed$TakeSubscriber;-><init>(Lrx/Subscriber;)V
.line 5
iget-wide v2, p0, Lrx/internal/operators/OperatorTakeTimed;->time:J
iget-object p1, p0, Lrx/internal/operators/OperatorTakeTimed;->unit:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v0, v1, v2, v3, p1}, Lrx/Scheduler$Worker;->schedule(Lrx/functions/Action0;JLjava/util/concurrent/TimeUnit;)Lrx/Subscription;
return-object v1
.end method