CacheStats.java
5.11 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
package com.google.common.cache;
import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.MoreObjects;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import javax.annotation.Nullable;
@Beta
@GwtCompatible
public final class CacheStats
{
private final long a;
private final long b;
private final long c;
private final long d;
private final long e;
private final long f;
public CacheStats(long paramLong1, long paramLong2, long paramLong3, long paramLong4, long paramLong5, long paramLong6)
{
if (paramLong1 >= 0L)
{
bool = true;
Preconditions.checkArgument(bool);
if (paramLong2 < 0L) {
break label133;
}
bool = true;
label27:
Preconditions.checkArgument(bool);
if (paramLong3 < 0L) {
break label139;
}
bool = true;
label42:
Preconditions.checkArgument(bool);
if (paramLong4 < 0L) {
break label145;
}
bool = true;
label57:
Preconditions.checkArgument(bool);
if (paramLong5 < 0L) {
break label151;
}
bool = true;
label72:
Preconditions.checkArgument(bool);
if (paramLong6 < 0L) {
break label157;
}
}
label133:
label139:
label145:
label151:
label157:
for (boolean bool = true;; bool = false)
{
Preconditions.checkArgument(bool);
this.a = paramLong1;
this.b = paramLong2;
this.c = paramLong3;
this.d = paramLong4;
this.e = paramLong5;
this.f = paramLong6;
return;
bool = false;
break;
bool = false;
break label27;
bool = false;
break label42;
bool = false;
break label57;
bool = false;
break label72;
}
}
public final double averageLoadPenalty()
{
long l = this.c + this.d;
if (l == 0L) {
return 0.0D;
}
return this.e / l;
}
public final boolean equals(@Nullable Object paramObject)
{
boolean bool2 = false;
boolean bool1 = bool2;
if ((paramObject instanceof CacheStats))
{
paramObject = (CacheStats)paramObject;
bool1 = bool2;
if (this.a == ((CacheStats)paramObject).a)
{
bool1 = bool2;
if (this.b == ((CacheStats)paramObject).b)
{
bool1 = bool2;
if (this.c == ((CacheStats)paramObject).c)
{
bool1 = bool2;
if (this.d == ((CacheStats)paramObject).d)
{
bool1 = bool2;
if (this.e == ((CacheStats)paramObject).e)
{
bool1 = bool2;
if (this.f == ((CacheStats)paramObject).f) {
bool1 = true;
}
}
}
}
}
}
}
return bool1;
}
public final long evictionCount()
{
return this.f;
}
public final int hashCode()
{
return Objects.hashCode(new Object[] { Long.valueOf(this.a), Long.valueOf(this.b), Long.valueOf(this.c), Long.valueOf(this.d), Long.valueOf(this.e), Long.valueOf(this.f) });
}
public final long hitCount()
{
return this.a;
}
public final double hitRate()
{
long l = requestCount();
if (l == 0L) {
return 1.0D;
}
return this.a / l;
}
public final long loadCount()
{
return this.c + this.d;
}
public final long loadExceptionCount()
{
return this.d;
}
public final double loadExceptionRate()
{
long l = this.c + this.d;
if (l == 0L) {
return 0.0D;
}
return this.d / l;
}
public final long loadSuccessCount()
{
return this.c;
}
public final CacheStats minus(CacheStats paramCacheStats)
{
return new CacheStats(Math.max(0L, this.a - paramCacheStats.a), Math.max(0L, this.b - paramCacheStats.b), Math.max(0L, this.c - paramCacheStats.c), Math.max(0L, this.d - paramCacheStats.d), Math.max(0L, this.e - paramCacheStats.e), Math.max(0L, this.f - paramCacheStats.f));
}
public final long missCount()
{
return this.b;
}
public final double missRate()
{
long l = requestCount();
if (l == 0L) {
return 0.0D;
}
return this.b / l;
}
public final CacheStats plus(CacheStats paramCacheStats)
{
return new CacheStats(this.a + paramCacheStats.a, this.b + paramCacheStats.b, this.c + paramCacheStats.c, this.d + paramCacheStats.d, this.e + paramCacheStats.e, this.f + paramCacheStats.f);
}
public final long requestCount()
{
return this.a + this.b;
}
public final String toString()
{
return MoreObjects.toStringHelper(this).add("hitCount", this.a).add("missCount", this.b).add("loadSuccessCount", this.c).add("loadExceptionCount", this.d).add("totalLoadTime", this.e).add("evictionCount", this.f).toString();
}
public final long totalLoadTime()
{
return this.e;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/google/common/cache/CacheStats.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/