zzm.java
2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
package com.google.android.gms.internal;
import android.os.Handler;
import android.os.Looper;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Set;
import java.util.concurrent.PriorityBlockingQueue;
import java.util.concurrent.atomic.AtomicInteger;
public class zzm
{
final Map<String, Queue<zzl<?>>> a = new HashMap();
final Set<zzl<?>> b = new HashSet();
final PriorityBlockingQueue<zzl<?>> c = new PriorityBlockingQueue();
List<Object> d = new ArrayList();
private AtomicInteger e = new AtomicInteger();
private final PriorityBlockingQueue<zzl<?>> f = new PriorityBlockingQueue();
private final zzb g;
private final zzg h;
private final zzo i;
private zzh[] j;
private zzc k;
public zzm(zzb paramzzb, zzg paramzzg)
{
this(paramzzb, paramzzg, 4);
}
public zzm(zzb paramzzb, zzg paramzzg, int paramInt)
{
this(paramzzb, paramzzg, paramInt, new zzf(new Handler(Looper.getMainLooper())));
}
public zzm(zzb paramzzb, zzg paramzzg, int paramInt, zzo paramzzo)
{
this.g = paramzzb;
this.h = paramzzg;
this.j = new zzh[paramInt];
this.i = paramzzo;
}
public int getSequenceNumber()
{
return this.e.incrementAndGet();
}
public void start()
{
stop();
this.k = new zzc(this.c, this.f, this.g, this.i);
this.k.start();
int m = 0;
while (m < this.j.length)
{
zzh localzzh = new zzh(this.f, this.h, this.g, this.i);
this.j[m] = localzzh;
localzzh.start();
m += 1;
}
}
public void stop()
{
if (this.k != null) {
this.k.quit();
}
int m = 0;
while (m < this.j.length)
{
if (this.j[m] != null) {
this.j[m].quit();
}
m += 1;
}
}
public <T> zzl<T> zze(zzl<T> paramzzl)
{
paramzzl.zza(this);
synchronized (this.b)
{
this.b.add(paramzzl);
paramzzl.zza(getSequenceNumber());
paramzzl.zzc("add-to-queue");
if (!paramzzl.zzn())
{
this.f.add(paramzzl);
return paramzzl;
}
}
for (;;)
{
String str;
synchronized (this.a)
{
str = paramzzl.zzg();
if (this.a.containsKey(str))
{
Queue localQueue = (Queue)this.a.get(str);
??? = localQueue;
if (localQueue == null) {
??? = new LinkedList();
}
((Queue)???).add(paramzzl);
this.a.put(str, ???);
if (zzt.DEBUG) {
zzt.zza("Request for cacheKey=%s is in flight, putting on hold.", new Object[] { str });
}
return paramzzl;
}
}
this.a.put(str, null);
this.c.add(paramzzl);
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/google/android/gms/internal/zzm.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/