ab.smali

.class final Lcom/google/common/util/concurrent/ab;
.super Ljava/lang/Object;
.source "ListenerCallQueue.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<",
        "L:Ljava/lang/Object;",
        ">",
        "Ljava/lang/Object;",
        "Ljava/lang/Runnable;"
    }
.end annotation


# static fields
.field static final logger:Ljava/util/logging/Logger;


# instance fields
.field private final aYY:Ljava/util/Queue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Queue",
            "<",
            "Lcom/google/common/util/concurrent/ac",
            "<T",
            "L;",
            ">;>;"
        }
    .end annotation
.end field

.field aYZ:Z

.field final executor:Ljava/util/concurrent/Executor;

.field final listener:Ljava/lang/Object;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "T",
            "L;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .registers 1

    .prologue
    .line 40
    const-class v0, Lcom/google/common/util/concurrent/ab;

    invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/util/logging/Logger;->getLogger(Ljava/lang/String;)Ljava/util/logging/Logger;

    move-result-object v0

    sput-object v0, Lcom/google/common/util/concurrent/ab;->logger:Ljava/util/logging/Logger;

    return-void
.end method

.method constructor <init>(Ljava/lang/Object;Ljava/util/concurrent/Executor;)V
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(T",
            "L;",
            "Ljava/util/concurrent/Executor;",
            ")V"
        }
    .end annotation

    .prologue
    .line 65
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 1062
    new-instance v0, Ljava/util/ArrayDeque;

    invoke-direct {v0}, Ljava/util/ArrayDeque;-><init>()V

    .line 62
    iput-object v0, p0, Lcom/google/common/util/concurrent/ab;->aYY:Ljava/util/Queue;

    .line 66
    invoke-static {p1}, Lcom/google/common/base/n;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    iput-object v0, p0, Lcom/google/common/util/concurrent/ab;->listener:Ljava/lang/Object;

    .line 67
    invoke-static {p2}, Lcom/google/common/base/n;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/concurrent/Executor;

    iput-object v0, p0, Lcom/google/common/util/concurrent/ab;->executor:Ljava/util/concurrent/Executor;

    .line 68
    return-void
.end method


# virtual methods
.method final declared-synchronized a(Lcom/google/common/util/concurrent/ac;)V
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/google/common/util/concurrent/ac",
            "<T",
            "L;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 72
    monitor-enter p0

    :try_start_1
    iget-object v0, p0, Lcom/google/common/util/concurrent/ab;->aYY:Ljava/util/Queue;

    invoke-interface {v0, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
    :try_end_6
    .catchall {:try_start_1 .. :try_end_6} :catchall_8

    .line 73
    monitor-exit p0

    return-void

    .line 72
    :catchall_8
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public final run()V
    .registers 4

    .prologue
    const/4 v1, 0x0

    .line 102
    const/4 v2, 0x1

    .line 106
    :goto_2
    :try_start_2
    monitor-enter p0
    :try_end_3
    .catchall {:try_start_2 .. :try_end_3} :catchall_29

    .line 107
    :try_start_3
    iget-boolean v0, p0, Lcom/google/common/util/concurrent/ab;->aYZ:Z

    invoke-static {v0}, Lcom/google/common/base/n;->checkState(Z)V

    .line 108
    iget-object v0, p0, Lcom/google/common/util/concurrent/ab;->aYY:Ljava/util/Queue;

    invoke-interface {v0}, Ljava/util/Queue;->poll()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/google/common/util/concurrent/ac;

    .line 109
    if-nez v0, :cond_17

    .line 110
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/google/common/util/concurrent/ab;->aYZ:Z
    :try_end_15
    .catchall {:try_start_3 .. :try_end_15} :catchall_19

    .line 112
    :try_start_15
    monitor-exit p0
    :try_end_16
    .catchall {:try_start_15 .. :try_end_16} :catchall_2c

    return-void

    .line 114
    :cond_17
    :try_start_17
    monitor-exit p0
    :try_end_18
    .catchall {:try_start_17 .. :try_end_18} :catchall_19

    goto :goto_2

    :catchall_19
    move-exception v0

    move v1, v2

    :goto_1b
    :try_start_1b
    monitor-exit p0
    :try_end_1c
    .catchall {:try_start_1b .. :try_end_1c} :catchall_2c

    :try_start_1c
    throw v0
    :try_end_1d
    .catchall {:try_start_1c .. :try_end_1d} :catchall_1d

    .line 127
    :catchall_1d
    move-exception v0

    :goto_1e
    if-eqz v1, :cond_25

    .line 131
    monitor-enter p0

    .line 132
    const/4 v1, 0x0

    :try_start_22
    iput-boolean v1, p0, Lcom/google/common/util/concurrent/ab;->aYZ:Z

    .line 133
    monitor-exit p0
    :try_end_25
    .catchall {:try_start_22 .. :try_end_25} :catchall_26

    :cond_25
    throw v0

    :catchall_26
    move-exception v0

    :try_start_27
    monitor-exit p0
    :try_end_28
    .catchall {:try_start_27 .. :try_end_28} :catchall_26

    throw v0

    .line 127
    :catchall_29
    move-exception v0

    move v1, v2

    goto :goto_1e

    .line 114
    :catchall_2c
    move-exception v0

    goto :goto_1b
.end method