今奥全景相机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

589 lines
14 KiB

.class public final Lcom/google/common/collect/Queues;
.super Ljava/lang/Object;
.source "Queues.java"
# direct methods
.method private constructor <init>()V
.locals 0
.prologue
.line 39
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static drain(Ljava/util/concurrent/BlockingQueue;Ljava/util/Collection;IJLjava/util/concurrent/TimeUnit;)I
.locals 7
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">(",
"Ljava/util/concurrent/BlockingQueue",
"<TE;>;",
"Ljava/util/Collection",
"<-TE;>;IJ",
"Ljava/util/concurrent/TimeUnit;",
")I"
}
.end annotation
.prologue
.line 196
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 202
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v0
invoke-virtual {p5, p3, p4}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J
move-result-wide v2
add-long/2addr v2, v0
.line 203
const/4 v0, 0x0
.line 204
:cond_0
:goto_0
if-ge v0, p2, :cond_1
.line 207
sub-int v1, p2, v0
invoke-interface {p0, p1, v1}, Ljava/util/concurrent/BlockingQueue;->drainTo(Ljava/util/Collection;I)I
move-result v1
add-int/2addr v0, v1
.line 208
if-ge v0, p2, :cond_0
.line 209
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v4
sub-long v4, v2, v4
sget-object v1, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-interface {p0, v4, v5, v1}, Ljava/util/concurrent/BlockingQueue;->poll(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
move-result-object v1
.line 210
if-nez v1, :cond_2
.line 217
:cond_1
return v0
.line 213
:cond_2
invoke-interface {p1, v1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
.line 214
add-int/lit8 v0, v0, 0x1
.line 215
goto :goto_0
.end method
.method public static drainUninterruptibly(Ljava/util/concurrent/BlockingQueue;Ljava/util/Collection;IJLjava/util/concurrent/TimeUnit;)I
.locals 7
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">(",
"Ljava/util/concurrent/BlockingQueue",
"<TE;>;",
"Ljava/util/Collection",
"<-TE;>;IJ",
"Ljava/util/concurrent/TimeUnit;",
")I"
}
.end annotation
.prologue
const/4 v1, 0x0
.line 236
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 237
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v2
invoke-virtual {p5, p3, p4}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J
move-result-wide v4
add-long/2addr v2, v4
move v0, v1
.line 241
:cond_0
:goto_0
if-ge v0, p2, :cond_1
.line 244
sub-int v4, p2, v0
:try_start_0
invoke-interface {p0, p1, v4}, Ljava/util/concurrent/BlockingQueue;->drainTo(Ljava/util/Collection;I)I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
move-result v4
add-int/2addr v0, v4
.line 245
if-ge v0, p2, :cond_0
.line 249
:goto_1
:try_start_1
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v4
sub-long v4, v2, v4
sget-object v6, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-interface {p0, v4, v5, v6}, Ljava/util/concurrent/BlockingQueue;->poll(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
:try_end_1
.catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
move-result-object v4
.line 255
if-nez v4, :cond_3
.line 263
:cond_1
if-eqz v1, :cond_2
.line 264
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Thread;->interrupt()V
.line 267
:cond_2
return v0
.line 251
:catch_0
move-exception v1
.line 252
const/4 v1, 0x1
.line 253
goto :goto_1
.line 258
:cond_3
:try_start_2
invoke-interface {p1, v4}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 259
add-int/lit8 v0, v0, 0x1
.line 260
goto :goto_0
.line 263
:catchall_0
move-exception v0
if-eqz v1, :cond_4
.line 264
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Thread;->interrupt()V
:cond_4
throw v0
.end method
.method public static newArrayBlockingQueue(I)Ljava/util/concurrent/ArrayBlockingQueue;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">(I)",
"Ljava/util/concurrent/ArrayBlockingQueue",
"<TE;>;"
}
.end annotation
.prologue
.line 48
new-instance v0, Ljava/util/concurrent/ArrayBlockingQueue;
invoke-direct {v0, p0}, Ljava/util/concurrent/ArrayBlockingQueue;-><init>(I)V
return-object v0
.end method
.method public static newConcurrentLinkedQueue()Ljava/util/concurrent/ConcurrentLinkedQueue;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">()",
"Ljava/util/concurrent/ConcurrentLinkedQueue",
"<TE;>;"
}
.end annotation
.prologue
.line 57
new-instance v0, Ljava/util/concurrent/ConcurrentLinkedQueue;
invoke-direct {v0}, Ljava/util/concurrent/ConcurrentLinkedQueue;-><init>()V
return-object v0
.end method
.method public static newConcurrentLinkedQueue(Ljava/lang/Iterable;)Ljava/util/concurrent/ConcurrentLinkedQueue;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Iterable",
"<+TE;>;)",
"Ljava/util/concurrent/ConcurrentLinkedQueue",
"<TE;>;"
}
.end annotation
.prologue
.line 66
instance-of v0, p0, Ljava/util/Collection;
if-eqz v0, :cond_0
.line 67
new-instance v0, Ljava/util/concurrent/ConcurrentLinkedQueue;
invoke-static {p0}, Lcom/google/common/collect/Collections2;->cast(Ljava/lang/Iterable;)Ljava/util/Collection;
move-result-object v1
invoke-direct {v0, v1}, Ljava/util/concurrent/ConcurrentLinkedQueue;-><init>(Ljava/util/Collection;)V
.line 71
:goto_0
return-object v0
.line 69
:cond_0
new-instance v0, Ljava/util/concurrent/ConcurrentLinkedQueue;
invoke-direct {v0}, Ljava/util/concurrent/ConcurrentLinkedQueue;-><init>()V
.line 70
invoke-static {v0, p0}, Lcom/google/common/collect/Iterables;->addAll(Ljava/util/Collection;Ljava/lang/Iterable;)Z
goto :goto_0
.end method
.method public static newLinkedBlockingQueue()Ljava/util/concurrent/LinkedBlockingQueue;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">()",
"Ljava/util/concurrent/LinkedBlockingQueue",
"<TE;>;"
}
.end annotation
.prologue
.line 80
new-instance v0, Ljava/util/concurrent/LinkedBlockingQueue;
invoke-direct {v0}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V
return-object v0
.end method
.method public static newLinkedBlockingQueue(I)Ljava/util/concurrent/LinkedBlockingQueue;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">(I)",
"Ljava/util/concurrent/LinkedBlockingQueue",
"<TE;>;"
}
.end annotation
.prologue
.line 89
new-instance v0, Ljava/util/concurrent/LinkedBlockingQueue;
invoke-direct {v0, p0}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>(I)V
return-object v0
.end method
.method public static newLinkedBlockingQueue(Ljava/lang/Iterable;)Ljava/util/concurrent/LinkedBlockingQueue;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Iterable",
"<+TE;>;)",
"Ljava/util/concurrent/LinkedBlockingQueue",
"<TE;>;"
}
.end annotation
.prologue
.line 101
instance-of v0, p0, Ljava/util/Collection;
if-eqz v0, :cond_0
.line 102
new-instance v0, Ljava/util/concurrent/LinkedBlockingQueue;
invoke-static {p0}, Lcom/google/common/collect/Collections2;->cast(Ljava/lang/Iterable;)Ljava/util/Collection;
move-result-object v1
invoke-direct {v0, v1}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>(Ljava/util/Collection;)V
.line 106
:goto_0
return-object v0
.line 104
:cond_0
new-instance v0, Ljava/util/concurrent/LinkedBlockingQueue;
invoke-direct {v0}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V
.line 105
invoke-static {v0, p0}, Lcom/google/common/collect/Iterables;->addAll(Ljava/util/Collection;Ljava/lang/Iterable;)Z
goto :goto_0
.end method
.method public static newPriorityBlockingQueue()Ljava/util/concurrent/PriorityBlockingQueue;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<E::",
"Ljava/lang/Comparable;",
">()",
"Ljava/util/concurrent/PriorityBlockingQueue",
"<TE;>;"
}
.end annotation
.prologue
.line 120
new-instance v0, Ljava/util/concurrent/PriorityBlockingQueue;
invoke-direct {v0}, Ljava/util/concurrent/PriorityBlockingQueue;-><init>()V
return-object v0
.end method
.method public static newPriorityBlockingQueue(Ljava/lang/Iterable;)Ljava/util/concurrent/PriorityBlockingQueue;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<E::",
"Ljava/lang/Comparable;",
">(",
"Ljava/lang/Iterable",
"<+TE;>;)",
"Ljava/util/concurrent/PriorityBlockingQueue",
"<TE;>;"
}
.end annotation
.prologue
.line 133
instance-of v0, p0, Ljava/util/Collection;
if-eqz v0, :cond_0
.line 134
new-instance v0, Ljava/util/concurrent/PriorityBlockingQueue;
invoke-static {p0}, Lcom/google/common/collect/Collections2;->cast(Ljava/lang/Iterable;)Ljava/util/Collection;
move-result-object v1
invoke-direct {v0, v1}, Ljava/util/concurrent/PriorityBlockingQueue;-><init>(Ljava/util/Collection;)V
.line 138
:goto_0
return-object v0
.line 136
:cond_0
new-instance v0, Ljava/util/concurrent/PriorityBlockingQueue;
invoke-direct {v0}, Ljava/util/concurrent/PriorityBlockingQueue;-><init>()V
.line 137
invoke-static {v0, p0}, Lcom/google/common/collect/Iterables;->addAll(Ljava/util/Collection;Ljava/lang/Iterable;)Z
goto :goto_0
.end method
.method public static newPriorityQueue()Ljava/util/PriorityQueue;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<E::",
"Ljava/lang/Comparable;",
">()",
"Ljava/util/PriorityQueue",
"<TE;>;"
}
.end annotation
.prologue
.line 150
new-instance v0, Ljava/util/PriorityQueue;
invoke-direct {v0}, Ljava/util/PriorityQueue;-><init>()V
return-object v0
.end method
.method public static newPriorityQueue(Ljava/lang/Iterable;)Ljava/util/PriorityQueue;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<E::",
"Ljava/lang/Comparable;",
">(",
"Ljava/lang/Iterable",
"<+TE;>;)",
"Ljava/util/PriorityQueue",
"<TE;>;"
}
.end annotation
.prologue
.line 163
instance-of v0, p0, Ljava/util/Collection;
if-eqz v0, :cond_0
.line 164
new-instance v0, Ljava/util/PriorityQueue;
invoke-static {p0}, Lcom/google/common/collect/Collections2;->cast(Ljava/lang/Iterable;)Ljava/util/Collection;
move-result-object v1
invoke-direct {v0, v1}, Ljava/util/PriorityQueue;-><init>(Ljava/util/Collection;)V
.line 168
:goto_0
return-object v0
.line 166
:cond_0
new-instance v0, Ljava/util/PriorityQueue;
invoke-direct {v0}, Ljava/util/PriorityQueue;-><init>()V
.line 167
invoke-static {v0, p0}, Lcom/google/common/collect/Iterables;->addAll(Ljava/util/Collection;Ljava/lang/Iterable;)Z
goto :goto_0
.end method
.method public static newSynchronousQueue()Ljava/util/concurrent/SynchronousQueue;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">()",
"Ljava/util/concurrent/SynchronousQueue",
"<TE;>;"
}
.end annotation
.prologue
.line 177
new-instance v0, Ljava/util/concurrent/SynchronousQueue;
invoke-direct {v0}, Ljava/util/concurrent/SynchronousQueue;-><init>()V
return-object v0
.end method
.method public static synchronizedQueue(Ljava/util/Queue;)Ljava/util/Queue;
.locals 1
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">(",
"Ljava/util/Queue",
"<TE;>;)",
"Ljava/util/Queue",
"<TE;>;"
}
.end annotation
.prologue
.line 299
const/4 v0, 0x0
invoke-static {p0, v0}, Lcom/google/common/collect/Synchronized;->queue(Ljava/util/Queue;Ljava/lang/Object;)Ljava/util/Queue;
move-result-object v0
return-object v0
.end method