mm$m.java
3.86 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
import com.google.common.base.Preconditions;
import com.google.common.cache.AbstractCache.SimpleStatsCounter;
import com.google.common.cache.AbstractCache.StatsCounter;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.CacheStats;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import java.io.Serializable;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ExecutionException;
import javax.annotation.Nullable;
public class mm$m<K, V>
implements Cache<K, V>, Serializable
{
private static final long serialVersionUID = 1L;
final mm<K, V> a;
public mm$m(CacheBuilder<? super K, ? super V> paramCacheBuilder)
{
this(new mm(paramCacheBuilder, null));
}
private mm$m(mm<K, V> parammm)
{
this.a = parammm;
}
public ConcurrentMap<K, V> asMap()
{
return this.a;
}
public void cleanUp()
{
mm.q[] arrayOfq = this.a.d;
int j = arrayOfq.length;
int i = 0;
while (i < j)
{
arrayOfq[i].b();
i += 1;
}
}
public V get(K paramK, final Callable<? extends V> paramCallable)
throws ExecutionException
{
Preconditions.checkNotNull(paramCallable);
(V)this.a.a(paramK, new CacheLoader()
{
public final V load(Object paramAnonymousObject)
throws Exception
{
return (V)paramCallable.call();
}
});
}
public ImmutableMap<K, V> getAllPresent(Iterable<?> paramIterable)
{
int j = 0;
mm localmm = this.a;
LinkedHashMap localLinkedHashMap = Maps.newLinkedHashMap();
paramIterable = paramIterable.iterator();
int i = 0;
while (paramIterable.hasNext())
{
Object localObject1 = paramIterable.next();
Object localObject2 = localmm.get(localObject1);
if (localObject2 == null)
{
j += 1;
}
else
{
localLinkedHashMap.put(localObject1, localObject2);
i += 1;
}
}
localmm.s.recordHits(i);
localmm.s.recordMisses(j);
return ImmutableMap.copyOf(localLinkedHashMap);
}
@Nullable
public V getIfPresent(Object paramObject)
{
mm localmm = this.a;
int i = localmm.a(Preconditions.checkNotNull(paramObject));
paramObject = localmm.a(i).a(paramObject, i);
if (paramObject == null)
{
localmm.s.recordMisses(1);
return (V)paramObject;
}
localmm.s.recordHits(1);
return (V)paramObject;
}
public void invalidate(Object paramObject)
{
Preconditions.checkNotNull(paramObject);
this.a.remove(paramObject);
}
public void invalidateAll()
{
this.a.clear();
}
public void invalidateAll(Iterable<?> paramIterable)
{
mm localmm = this.a;
paramIterable = paramIterable.iterator();
while (paramIterable.hasNext()) {
localmm.remove(paramIterable.next());
}
}
public void put(K paramK, V paramV)
{
this.a.put(paramK, paramV);
}
public void putAll(Map<? extends K, ? extends V> paramMap)
{
this.a.putAll(paramMap);
}
public long size()
{
return this.a.m();
}
public CacheStats stats()
{
AbstractCache.SimpleStatsCounter localSimpleStatsCounter = new AbstractCache.SimpleStatsCounter();
localSimpleStatsCounter.incrementBy(this.a.s);
mm.q[] arrayOfq = this.a.d;
int j = arrayOfq.length;
int i = 0;
while (i < j)
{
localSimpleStatsCounter.incrementBy(arrayOfq[i].n);
i += 1;
}
return localSimpleStatsCounter.snapshot();
}
Object writeReplace()
{
return new mm.n(this.a);
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/mm$m.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/