2287 |
|
int index; // index of bin to use next |
2288 |
|
int baseIndex; // current index of initial table |
2289 |
|
int baseLimit; // index bound for initial table |
2290 |
< |
final int baseSize; // initial table size |
2290 |
> |
int baseSize; // initial table size |
2291 |
|
|
2292 |
|
/** Creates iterator for all entries in the table. */ |
2293 |
|
Traverser(ConcurrentHashMapV8<K, V> map) { |
2294 |
< |
this.tab = (this.map = map).table; |
2295 |
< |
baseLimit = baseSize = (tab == null) ? 0 : tab.length; |
2294 |
> |
this.map = map; |
2295 |
|
} |
2296 |
|
|
2297 |
|
/** Creates iterator for split() methods */ |
2298 |
|
Traverser(Traverser<K,V,?> it) { |
2299 |
< |
this.map = it.map; |
2300 |
< |
this.tab = it.tab; |
2299 |
> |
ConcurrentHashMapV8<K, V> m; Node[] t; |
2300 |
> |
if ((m = this.map = it.map) == null) |
2301 |
> |
t = null; |
2302 |
> |
else if ((t = it.tab) == null && // force parent tab initialization |
2303 |
> |
(t = it.tab = m.table) != null) |
2304 |
> |
it.baseLimit = it.baseSize = t.length; |
2305 |
> |
this.tab = t; |
2306 |
|
this.baseSize = it.baseSize; |
2307 |
|
it.baseLimit = this.index = this.baseIndex = |
2308 |
|
((this.baseLimit = it.baseLimit) + it.baseIndex + 1) >>> 1; |
2319 |
|
if (e != null) // advance past used/skipped node |
2320 |
|
e = e.next; |
2321 |
|
while (e == null) { // get to next non-null bin |
2322 |
+ |
ConcurrentHashMapV8<K, V> m; |
2323 |
|
Node[] t; int b, i, n; Object ek; // checks must use locals |
2324 |
< |
if ((b = baseIndex) >= baseLimit || (i = index) < 0 || |
2325 |
< |
(t = tab) == null || i >= (n = t.length)) |
2324 |
> |
if ((t = tab) != null) |
2325 |
> |
n = t.length; |
2326 |
> |
else if ((m = map) != null && (t = tab = m.table) != null) |
2327 |
> |
n = baseLimit = baseSize = t.length; |
2328 |
> |
else |
2329 |
|
break outer; |
2330 |
< |
else if ((e = tabAt(t, i)) != null && e.hash == MOVED) { |
2330 |
> |
if ((b = baseIndex) >= baseLimit || |
2331 |
> |
(i = index) < 0 || i >= n) |
2332 |
> |
break outer; |
2333 |
> |
if ((e = tabAt(t, i)) != null && e.hash == MOVED) { |
2334 |
|
if ((ek = e.key) instanceof TreeBin) |
2335 |
|
e = ((TreeBin)ek).first; |
2336 |
|
else { |
2505 |
|
} |
2506 |
|
|
2507 |
|
/** |
2508 |
+ |
* Returns the value to which the specified key is mapped, |
2509 |
+ |
* or the given defaultValue if this map contains no mapping for the key. |
2510 |
+ |
* |
2511 |
+ |
* @param key the key |
2512 |
+ |
* @param defaultValue the value to return if this map contains |
2513 |
+ |
* no mapping for the given key. |
2514 |
+ |
* @return the mapping for the key, if present; else the defaultValue |
2515 |
+ |
* @throws NullPointerException if the specified key is null |
2516 |
+ |
*/ |
2517 |
+ |
@SuppressWarnings("unchecked") public V getValueOrDefault(Object key, V defaultValue) { |
2518 |
+ |
if (key == null) |
2519 |
+ |
throw new NullPointerException(); |
2520 |
+ |
V v = (V) internalGet(key); |
2521 |
+ |
return v == null ? defaultValue : v; |
2522 |
+ |
} |
2523 |
+ |
|
2524 |
+ |
/** |
2525 |
|
* Tests if the specified object is a key in this table. |
2526 |
|
* |
2527 |
|
* @param key possible key |
4187 |
|
(ConcurrentHashMapV8<K,V> map, |
4188 |
|
BiAction<K,V> action) { |
4189 |
|
if (action == null) throw new NullPointerException(); |
4190 |
< |
return new ForEachMappingTask<K,V>(map, action); |
4190 |
> |
return new ForEachMappingTask<K,V>(map, null, -1, action); |
4191 |
|
} |
4192 |
|
|
4193 |
|
/** |
4208 |
|
if (transformer == null || action == null) |
4209 |
|
throw new NullPointerException(); |
4210 |
|
return new ForEachTransformedMappingTask<K,V,U> |
4211 |
< |
(map, transformer, action); |
4211 |
> |
(map, null, -1, transformer, action); |
4212 |
|
} |
4213 |
|
|
4214 |
|
/** |
4228 |
|
BiFun<? super K, ? super V, ? extends U> searchFunction) { |
4229 |
|
if (searchFunction == null) throw new NullPointerException(); |
4230 |
|
return new SearchMappingsTask<K,V,U> |
4231 |
< |
(map, searchFunction, |
4231 |
> |
(map, null, -1, searchFunction, |
4232 |
|
new AtomicReference<U>()); |
4233 |
|
} |
4234 |
|
|
4251 |
|
if (transformer == null || reducer == null) |
4252 |
|
throw new NullPointerException(); |
4253 |
|
return new MapReduceMappingsTask<K,V,U> |
4254 |
< |
(map, transformer, reducer); |
4254 |
> |
(map, null, -1, null, transformer, reducer); |
4255 |
|
} |
4256 |
|
|
4257 |
|
/** |
4275 |
|
if (transformer == null || reducer == null) |
4276 |
|
throw new NullPointerException(); |
4277 |
|
return new MapReduceMappingsToDoubleTask<K,V> |
4278 |
< |
(map, transformer, basis, reducer); |
4278 |
> |
(map, null, -1, null, transformer, basis, reducer); |
4279 |
|
} |
4280 |
|
|
4281 |
|
/** |
4299 |
|
if (transformer == null || reducer == null) |
4300 |
|
throw new NullPointerException(); |
4301 |
|
return new MapReduceMappingsToLongTask<K,V> |
4302 |
< |
(map, transformer, basis, reducer); |
4302 |
> |
(map, null, -1, null, transformer, basis, reducer); |
4303 |
|
} |
4304 |
|
|
4305 |
|
/** |
4322 |
|
if (transformer == null || reducer == null) |
4323 |
|
throw new NullPointerException(); |
4324 |
|
return new MapReduceMappingsToIntTask<K,V> |
4325 |
< |
(map, transformer, basis, reducer); |
4325 |
> |
(map, null, -1, null, transformer, basis, reducer); |
4326 |
|
} |
4327 |
|
|
4328 |
|
/** |
4337 |
|
(ConcurrentHashMapV8<K,V> map, |
4338 |
|
Action<K> action) { |
4339 |
|
if (action == null) throw new NullPointerException(); |
4340 |
< |
return new ForEachKeyTask<K,V>(map, action); |
4340 |
> |
return new ForEachKeyTask<K,V>(map, null, -1, action); |
4341 |
|
} |
4342 |
|
|
4343 |
|
/** |
4358 |
|
if (transformer == null || action == null) |
4359 |
|
throw new NullPointerException(); |
4360 |
|
return new ForEachTransformedKeyTask<K,V,U> |
4361 |
< |
(map, transformer, action); |
4361 |
> |
(map, null, -1, transformer, action); |
4362 |
|
} |
4363 |
|
|
4364 |
|
/** |
4378 |
|
Fun<? super K, ? extends U> searchFunction) { |
4379 |
|
if (searchFunction == null) throw new NullPointerException(); |
4380 |
|
return new SearchKeysTask<K,V,U> |
4381 |
< |
(map, searchFunction, |
4381 |
> |
(map, null, -1, searchFunction, |
4382 |
|
new AtomicReference<U>()); |
4383 |
|
} |
4384 |
|
|
4396 |
|
BiFun<? super K, ? super K, ? extends K> reducer) { |
4397 |
|
if (reducer == null) throw new NullPointerException(); |
4398 |
|
return new ReduceKeysTask<K,V> |
4399 |
< |
(map, reducer); |
4399 |
> |
(map, null, -1, null, reducer); |
4400 |
|
} |
4401 |
|
|
4402 |
|
/** |
4418 |
|
if (transformer == null || reducer == null) |
4419 |
|
throw new NullPointerException(); |
4420 |
|
return new MapReduceKeysTask<K,V,U> |
4421 |
< |
(map, transformer, reducer); |
4421 |
> |
(map, null, -1, null, transformer, reducer); |
4422 |
|
} |
4423 |
|
|
4424 |
|
/** |
4442 |
|
if (transformer == null || reducer == null) |
4443 |
|
throw new NullPointerException(); |
4444 |
|
return new MapReduceKeysToDoubleTask<K,V> |
4445 |
< |
(map, transformer, basis, reducer); |
4445 |
> |
(map, null, -1, null, transformer, basis, reducer); |
4446 |
|
} |
4447 |
|
|
4448 |
|
/** |
4466 |
|
if (transformer == null || reducer == null) |
4467 |
|
throw new NullPointerException(); |
4468 |
|
return new MapReduceKeysToLongTask<K,V> |
4469 |
< |
(map, transformer, basis, reducer); |
4469 |
> |
(map, null, -1, null, transformer, basis, reducer); |
4470 |
|
} |
4471 |
|
|
4472 |
|
/** |
4490 |
|
if (transformer == null || reducer == null) |
4491 |
|
throw new NullPointerException(); |
4492 |
|
return new MapReduceKeysToIntTask<K,V> |
4493 |
< |
(map, transformer, basis, reducer); |
4493 |
> |
(map, null, -1, null, transformer, basis, reducer); |
4494 |
|
} |
4495 |
|
|
4496 |
|
/** |
4504 |
|
(ConcurrentHashMapV8<K,V> map, |
4505 |
|
Action<V> action) { |
4506 |
|
if (action == null) throw new NullPointerException(); |
4507 |
< |
return new ForEachValueTask<K,V>(map, action); |
4507 |
> |
return new ForEachValueTask<K,V>(map, null, -1, action); |
4508 |
|
} |
4509 |
|
|
4510 |
|
/** |
4524 |
|
if (transformer == null || action == null) |
4525 |
|
throw new NullPointerException(); |
4526 |
|
return new ForEachTransformedValueTask<K,V,U> |
4527 |
< |
(map, transformer, action); |
4527 |
> |
(map, null, -1, transformer, action); |
4528 |
|
} |
4529 |
|
|
4530 |
|
/** |
4545 |
|
Fun<? super V, ? extends U> searchFunction) { |
4546 |
|
if (searchFunction == null) throw new NullPointerException(); |
4547 |
|
return new SearchValuesTask<K,V,U> |
4548 |
< |
(map, searchFunction, |
4548 |
> |
(map, null, -1, searchFunction, |
4549 |
|
new AtomicReference<U>()); |
4550 |
|
} |
4551 |
|
|
4563 |
|
BiFun<? super V, ? super V, ? extends V> reducer) { |
4564 |
|
if (reducer == null) throw new NullPointerException(); |
4565 |
|
return new ReduceValuesTask<K,V> |
4566 |
< |
(map, reducer); |
4566 |
> |
(map, null, -1, null, reducer); |
4567 |
|
} |
4568 |
|
|
4569 |
|
/** |
4585 |
|
if (transformer == null || reducer == null) |
4586 |
|
throw new NullPointerException(); |
4587 |
|
return new MapReduceValuesTask<K,V,U> |
4588 |
< |
(map, transformer, reducer); |
4588 |
> |
(map, null, -1, null, transformer, reducer); |
4589 |
|
} |
4590 |
|
|
4591 |
|
/** |
4609 |
|
if (transformer == null || reducer == null) |
4610 |
|
throw new NullPointerException(); |
4611 |
|
return new MapReduceValuesToDoubleTask<K,V> |
4612 |
< |
(map, transformer, basis, reducer); |
4612 |
> |
(map, null, -1, null, transformer, basis, reducer); |
4613 |
|
} |
4614 |
|
|
4615 |
|
/** |
4633 |
|
if (transformer == null || reducer == null) |
4634 |
|
throw new NullPointerException(); |
4635 |
|
return new MapReduceValuesToLongTask<K,V> |
4636 |
< |
(map, transformer, basis, reducer); |
4636 |
> |
(map, null, -1, null, transformer, basis, reducer); |
4637 |
|
} |
4638 |
|
|
4639 |
|
/** |
4657 |
|
if (transformer == null || reducer == null) |
4658 |
|
throw new NullPointerException(); |
4659 |
|
return new MapReduceValuesToIntTask<K,V> |
4660 |
< |
(map, transformer, basis, reducer); |
4660 |
> |
(map, null, -1, null, transformer, basis, reducer); |
4661 |
|
} |
4662 |
|
|
4663 |
|
/** |
4671 |
|
(ConcurrentHashMapV8<K,V> map, |
4672 |
|
Action<Map.Entry<K,V>> action) { |
4673 |
|
if (action == null) throw new NullPointerException(); |
4674 |
< |
return new ForEachEntryTask<K,V>(map, action); |
4674 |
> |
return new ForEachEntryTask<K,V>(map, null, -1, action); |
4675 |
|
} |
4676 |
|
|
4677 |
|
/** |
4691 |
|
if (transformer == null || action == null) |
4692 |
|
throw new NullPointerException(); |
4693 |
|
return new ForEachTransformedEntryTask<K,V,U> |
4694 |
< |
(map, transformer, action); |
4694 |
> |
(map, null, -1, transformer, action); |
4695 |
|
} |
4696 |
|
|
4697 |
|
/** |
4712 |
|
Fun<Map.Entry<K,V>, ? extends U> searchFunction) { |
4713 |
|
if (searchFunction == null) throw new NullPointerException(); |
4714 |
|
return new SearchEntriesTask<K,V,U> |
4715 |
< |
(map, searchFunction, |
4715 |
> |
(map, null, -1, searchFunction, |
4716 |
|
new AtomicReference<U>()); |
4717 |
|
} |
4718 |
|
|
4730 |
|
BiFun<Map.Entry<K,V>, Map.Entry<K,V>, ? extends Map.Entry<K,V>> reducer) { |
4731 |
|
if (reducer == null) throw new NullPointerException(); |
4732 |
|
return new ReduceEntriesTask<K,V> |
4733 |
< |
(map, reducer); |
4733 |
> |
(map, null, -1, null, reducer); |
4734 |
|
} |
4735 |
|
|
4736 |
|
/** |
4752 |
|
if (transformer == null || reducer == null) |
4753 |
|
throw new NullPointerException(); |
4754 |
|
return new MapReduceEntriesTask<K,V,U> |
4755 |
< |
(map, transformer, reducer); |
4755 |
> |
(map, null, -1, null, transformer, reducer); |
4756 |
|
} |
4757 |
|
|
4758 |
|
/** |
4776 |
|
if (transformer == null || reducer == null) |
4777 |
|
throw new NullPointerException(); |
4778 |
|
return new MapReduceEntriesToDoubleTask<K,V> |
4779 |
< |
(map, transformer, basis, reducer); |
4779 |
> |
(map, null, -1, null, transformer, basis, reducer); |
4780 |
|
} |
4781 |
|
|
4782 |
|
/** |
4800 |
|
if (transformer == null || reducer == null) |
4801 |
|
throw new NullPointerException(); |
4802 |
|
return new MapReduceEntriesToLongTask<K,V> |
4803 |
< |
(map, transformer, basis, reducer); |
4803 |
> |
(map, null, -1, null, transformer, basis, reducer); |
4804 |
|
} |
4805 |
|
|
4806 |
|
/** |
4824 |
|
if (transformer == null || reducer == null) |
4825 |
|
throw new NullPointerException(); |
4826 |
|
return new MapReduceEntriesToIntTask<K,V> |
4827 |
< |
(map, transformer, basis, reducer); |
4827 |
> |
(map, null, -1, null, transformer, basis, reducer); |
4828 |
|
} |
4829 |
|
} |
4830 |
|
|
4843 |
|
*/ |
4844 |
|
@SuppressWarnings("serial") static abstract class BulkTask<K,V,R> extends Traverser<K,V,R> { |
4845 |
|
final BulkTask<K,V,?> parent; // completion target |
4846 |
< |
int batch; // split control |
4846 |
> |
int batch; // split control; -1 for unknown |
4847 |
|
int pending; // completion control |
4848 |
|
|
4849 |
< |
/** Constructor for root tasks */ |
4850 |
< |
BulkTask(ConcurrentHashMapV8<K,V> map) { |
4849 |
> |
BulkTask(ConcurrentHashMapV8<K,V> map, BulkTask<K,V,?> parent, |
4850 |
> |
int batch) { |
4851 |
|
super(map); |
4824 |
– |
this.parent = null; |
4825 |
– |
this.batch = -1; // force call to batch() on execution |
4826 |
– |
} |
4827 |
– |
|
4828 |
– |
/** Constructor for subtasks */ |
4829 |
– |
BulkTask(BulkTask<K,V,?> parent, int batch) { |
4830 |
– |
super(parent); |
4852 |
|
this.parent = parent; |
4853 |
|
this.batch = batch; |
4854 |
+ |
if (parent != null && map != null) { // split parent |
4855 |
+ |
Node[] t; |
4856 |
+ |
if ((t = parent.tab) == null && |
4857 |
+ |
(t = parent.tab = map.table) != null) |
4858 |
+ |
parent.baseLimit = parent.baseSize = t.length; |
4859 |
+ |
this.tab = t; |
4860 |
+ |
this.baseSize = parent.baseSize; |
4861 |
+ |
int hi = this.baseLimit = parent.baseLimit; |
4862 |
+ |
parent.baseLimit = this.index = this.baseIndex = |
4863 |
+ |
(hi + parent.baseIndex + 1) >>> 1; |
4864 |
+ |
} |
4865 |
|
} |
4866 |
|
|
4867 |
|
// FJ methods |
4925 |
|
* dividing by two anyway. |
4926 |
|
*/ |
4927 |
|
final int batch() { |
4928 |
< |
int b = batch; |
4929 |
< |
if (b < 0) { |
4930 |
< |
long n = map.counter.sum(); |
4931 |
< |
int sp = getPool().getParallelism() << 3; // slack of 8 |
4932 |
< |
b = batch = (n <= 0L) ? 0 : (n < (long)sp) ? (int)n : sp; |
4928 |
> |
ConcurrentHashMapV8<K, V> m; int b; Node[] t; |
4929 |
> |
if ((b = batch) < 0 && (m = map) != null) { // force initialization |
4930 |
> |
if ((t = tab) == null && (t = tab = m.table) != null) |
4931 |
> |
baseLimit = baseSize = t.length; |
4932 |
> |
if (t != null) { |
4933 |
> |
long n = m.counter.sum(); |
4934 |
> |
int sp = getPool().getParallelism() << 3; // slack of 8 |
4935 |
> |
b = batch = (n <= 0L) ? 0 : (n < (long)sp) ? (int)n : sp; |
4936 |
> |
} |
4937 |
|
} |
4938 |
|
return b; |
4939 |
|
} |
4969 |
|
extends BulkTask<K,V,Void> { |
4970 |
|
final Action<K> action; |
4971 |
|
ForEachKeyTask |
4972 |
< |
(ConcurrentHashMapV8<K,V> m, |
4937 |
< |
Action<K> action) { |
4938 |
< |
super(m); |
4939 |
< |
this.action = action; |
4940 |
< |
} |
4941 |
< |
ForEachKeyTask |
4942 |
< |
(BulkTask<K,V,?> p, int b, |
4972 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
4973 |
|
Action<K> action) { |
4974 |
< |
super(p, b); |
4974 |
> |
super(m, p, b); |
4975 |
|
this.action = action; |
4976 |
|
} |
4977 |
|
@SuppressWarnings("unchecked") public final boolean exec() { |
4982 |
|
int b = batch(), c; |
4983 |
|
while (b > 1 && baseIndex != baseLimit) { |
4984 |
|
do {} while (!casPending(c = pending, c+1)); |
4985 |
< |
new ForEachKeyTask<K,V>(this, b >>>= 1, action).fork(); |
4985 |
> |
new ForEachKeyTask<K,V>(map, this, b >>>= 1, action).fork(); |
4986 |
|
} |
4987 |
|
while (advance() != null) |
4988 |
|
action.apply((K)nextKey); |
4998 |
|
extends BulkTask<K,V,Void> { |
4999 |
|
final Action<V> action; |
5000 |
|
ForEachValueTask |
5001 |
< |
(ConcurrentHashMapV8<K,V> m, |
5001 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5002 |
|
Action<V> action) { |
5003 |
< |
super(m); |
4974 |
< |
this.action = action; |
4975 |
< |
} |
4976 |
< |
ForEachValueTask |
4977 |
< |
(BulkTask<K,V,?> p, int b, |
4978 |
< |
Action<V> action) { |
4979 |
< |
super(p, b); |
5003 |
> |
super(m, p, b); |
5004 |
|
this.action = action; |
5005 |
|
} |
5006 |
|
@SuppressWarnings("unchecked") public final boolean exec() { |
5011 |
|
int b = batch(), c; |
5012 |
|
while (b > 1 && baseIndex != baseLimit) { |
5013 |
|
do {} while (!casPending(c = pending, c+1)); |
5014 |
< |
new ForEachValueTask<K,V>(this, b >>>= 1, action).fork(); |
5014 |
> |
new ForEachValueTask<K,V>(map, this, b >>>= 1, action).fork(); |
5015 |
|
} |
5016 |
|
Object v; |
5017 |
|
while ((v = advance()) != null) |
5028 |
|
extends BulkTask<K,V,Void> { |
5029 |
|
final Action<Entry<K,V>> action; |
5030 |
|
ForEachEntryTask |
5031 |
< |
(ConcurrentHashMapV8<K,V> m, |
5031 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5032 |
|
Action<Entry<K,V>> action) { |
5033 |
< |
super(m); |
5010 |
< |
this.action = action; |
5011 |
< |
} |
5012 |
< |
ForEachEntryTask |
5013 |
< |
(BulkTask<K,V,?> p, int b, |
5014 |
< |
Action<Entry<K,V>> action) { |
5015 |
< |
super(p, b); |
5033 |
> |
super(m, p, b); |
5034 |
|
this.action = action; |
5035 |
|
} |
5036 |
|
@SuppressWarnings("unchecked") public final boolean exec() { |
5041 |
|
int b = batch(), c; |
5042 |
|
while (b > 1 && baseIndex != baseLimit) { |
5043 |
|
do {} while (!casPending(c = pending, c+1)); |
5044 |
< |
new ForEachEntryTask<K,V>(this, b >>>= 1, action).fork(); |
5044 |
> |
new ForEachEntryTask<K,V>(map, this, b >>>= 1, action).fork(); |
5045 |
|
} |
5046 |
|
Object v; |
5047 |
|
while ((v = advance()) != null) |
5058 |
|
extends BulkTask<K,V,Void> { |
5059 |
|
final BiAction<K,V> action; |
5060 |
|
ForEachMappingTask |
5061 |
< |
(ConcurrentHashMapV8<K,V> m, |
5061 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5062 |
|
BiAction<K,V> action) { |
5063 |
< |
super(m); |
5063 |
> |
super(m, p, b); |
5064 |
|
this.action = action; |
5065 |
|
} |
5048 |
– |
ForEachMappingTask |
5049 |
– |
(BulkTask<K,V,?> p, int b, |
5050 |
– |
BiAction<K,V> action) { |
5051 |
– |
super(p, b); |
5052 |
– |
this.action = action; |
5053 |
– |
} |
5054 |
– |
|
5066 |
|
@SuppressWarnings("unchecked") public final boolean exec() { |
5067 |
|
final BiAction<K,V> action = this.action; |
5068 |
|
if (action == null) |
5071 |
|
int b = batch(), c; |
5072 |
|
while (b > 1 && baseIndex != baseLimit) { |
5073 |
|
do {} while (!casPending(c = pending, c+1)); |
5074 |
< |
new ForEachMappingTask<K,V>(this, b >>>= 1, |
5074 |
> |
new ForEachMappingTask<K,V>(map, this, b >>>= 1, |
5075 |
|
action).fork(); |
5076 |
|
} |
5077 |
|
Object v; |
5090 |
|
final Fun<? super K, ? extends U> transformer; |
5091 |
|
final Action<U> action; |
5092 |
|
ForEachTransformedKeyTask |
5093 |
< |
(ConcurrentHashMapV8<K,V> m, |
5093 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5094 |
|
Fun<? super K, ? extends U> transformer, |
5095 |
|
Action<U> action) { |
5096 |
< |
super(m); |
5096 |
> |
super(m, p, b); |
5097 |
|
this.transformer = transformer; |
5098 |
|
this.action = action; |
5099 |
|
|
5100 |
|
} |
5090 |
– |
ForEachTransformedKeyTask |
5091 |
– |
(BulkTask<K,V,?> p, int b, |
5092 |
– |
Fun<? super K, ? extends U> transformer, |
5093 |
– |
Action<U> action) { |
5094 |
– |
super(p, b); |
5095 |
– |
this.transformer = transformer; |
5096 |
– |
this.action = action; |
5097 |
– |
} |
5101 |
|
@SuppressWarnings("unchecked") public final boolean exec() { |
5102 |
|
final Fun<? super K, ? extends U> transformer = |
5103 |
|
this.transformer; |
5109 |
|
while (b > 1 && baseIndex != baseLimit) { |
5110 |
|
do {} while (!casPending(c = pending, c+1)); |
5111 |
|
new ForEachTransformedKeyTask<K,V,U> |
5112 |
< |
(this, b >>>= 1, transformer, action).fork(); |
5112 |
> |
(map, this, b >>>= 1, transformer, action).fork(); |
5113 |
|
} |
5114 |
|
U u; |
5115 |
|
while (advance() != null) { |
5129 |
|
final Fun<? super V, ? extends U> transformer; |
5130 |
|
final Action<U> action; |
5131 |
|
ForEachTransformedValueTask |
5132 |
< |
(ConcurrentHashMapV8<K,V> m, |
5132 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5133 |
|
Fun<? super V, ? extends U> transformer, |
5134 |
|
Action<U> action) { |
5135 |
< |
super(m); |
5135 |
> |
super(m, p, b); |
5136 |
|
this.transformer = transformer; |
5137 |
|
this.action = action; |
5138 |
|
|
5139 |
|
} |
5137 |
– |
ForEachTransformedValueTask |
5138 |
– |
(BulkTask<K,V,?> p, int b, |
5139 |
– |
Fun<? super V, ? extends U> transformer, |
5140 |
– |
Action<U> action) { |
5141 |
– |
super(p, b); |
5142 |
– |
this.transformer = transformer; |
5143 |
– |
this.action = action; |
5144 |
– |
} |
5140 |
|
@SuppressWarnings("unchecked") public final boolean exec() { |
5141 |
|
final Fun<? super V, ? extends U> transformer = |
5142 |
|
this.transformer; |
5148 |
|
while (b > 1 && baseIndex != baseLimit) { |
5149 |
|
do {} while (!casPending(c = pending, c+1)); |
5150 |
|
new ForEachTransformedValueTask<K,V,U> |
5151 |
< |
(this, b >>>= 1, transformer, action).fork(); |
5151 |
> |
(map, this, b >>>= 1, transformer, action).fork(); |
5152 |
|
} |
5153 |
|
Object v; U u; |
5154 |
|
while ((v = advance()) != null) { |
5168 |
|
final Fun<Map.Entry<K,V>, ? extends U> transformer; |
5169 |
|
final Action<U> action; |
5170 |
|
ForEachTransformedEntryTask |
5171 |
< |
(ConcurrentHashMapV8<K,V> m, |
5171 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5172 |
|
Fun<Map.Entry<K,V>, ? extends U> transformer, |
5173 |
|
Action<U> action) { |
5174 |
< |
super(m); |
5174 |
> |
super(m, p, b); |
5175 |
|
this.transformer = transformer; |
5176 |
|
this.action = action; |
5177 |
|
|
5178 |
|
} |
5184 |
– |
ForEachTransformedEntryTask |
5185 |
– |
(BulkTask<K,V,?> p, int b, |
5186 |
– |
Fun<Map.Entry<K,V>, ? extends U> transformer, |
5187 |
– |
Action<U> action) { |
5188 |
– |
super(p, b); |
5189 |
– |
this.transformer = transformer; |
5190 |
– |
this.action = action; |
5191 |
– |
} |
5179 |
|
@SuppressWarnings("unchecked") public final boolean exec() { |
5180 |
|
final Fun<Map.Entry<K,V>, ? extends U> transformer = |
5181 |
|
this.transformer; |
5187 |
|
while (b > 1 && baseIndex != baseLimit) { |
5188 |
|
do {} while (!casPending(c = pending, c+1)); |
5189 |
|
new ForEachTransformedEntryTask<K,V,U> |
5190 |
< |
(this, b >>>= 1, transformer, action).fork(); |
5190 |
> |
(map, this, b >>>= 1, transformer, action).fork(); |
5191 |
|
} |
5192 |
|
Object v; U u; |
5193 |
|
while ((v = advance()) != null) { |
5207 |
|
final BiFun<? super K, ? super V, ? extends U> transformer; |
5208 |
|
final Action<U> action; |
5209 |
|
ForEachTransformedMappingTask |
5210 |
< |
(ConcurrentHashMapV8<K,V> m, |
5210 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5211 |
|
BiFun<? super K, ? super V, ? extends U> transformer, |
5212 |
|
Action<U> action) { |
5213 |
< |
super(m); |
5213 |
> |
super(m, p, b); |
5214 |
|
this.transformer = transformer; |
5215 |
|
this.action = action; |
5216 |
|
|
5217 |
|
} |
5231 |
– |
ForEachTransformedMappingTask |
5232 |
– |
(BulkTask<K,V,?> p, int b, |
5233 |
– |
BiFun<? super K, ? super V, ? extends U> transformer, |
5234 |
– |
Action<U> action) { |
5235 |
– |
super(p, b); |
5236 |
– |
this.transformer = transformer; |
5237 |
– |
this.action = action; |
5238 |
– |
} |
5218 |
|
@SuppressWarnings("unchecked") public final boolean exec() { |
5219 |
|
final BiFun<? super K, ? super V, ? extends U> transformer = |
5220 |
|
this.transformer; |
5226 |
|
while (b > 1 && baseIndex != baseLimit) { |
5227 |
|
do {} while (!casPending(c = pending, c+1)); |
5228 |
|
new ForEachTransformedMappingTask<K,V,U> |
5229 |
< |
(this, b >>>= 1, transformer, action).fork(); |
5229 |
> |
(map, this, b >>>= 1, transformer, action).fork(); |
5230 |
|
} |
5231 |
|
Object v; U u; |
5232 |
|
while ((v = advance()) != null) { |
5246 |
|
final Fun<? super K, ? extends U> searchFunction; |
5247 |
|
final AtomicReference<U> result; |
5248 |
|
SearchKeysTask |
5249 |
< |
(ConcurrentHashMapV8<K,V> m, |
5249 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5250 |
|
Fun<? super K, ? extends U> searchFunction, |
5251 |
|
AtomicReference<U> result) { |
5252 |
< |
super(m); |
5274 |
< |
this.searchFunction = searchFunction; this.result = result; |
5275 |
< |
} |
5276 |
< |
SearchKeysTask |
5277 |
< |
(BulkTask<K,V,?> p, int b, |
5278 |
< |
Fun<? super K, ? extends U> searchFunction, |
5279 |
< |
AtomicReference<U> result) { |
5280 |
< |
super(p, b); |
5252 |
> |
super(m, p, b); |
5253 |
|
this.searchFunction = searchFunction; this.result = result; |
5254 |
|
} |
5255 |
|
@SuppressWarnings("unchecked") public final boolean exec() { |
5262 |
|
int b = batch(), c; |
5263 |
|
while (b > 1 && baseIndex != baseLimit && result.get() == null) { |
5264 |
|
do {} while (!casPending(c = pending, c+1)); |
5265 |
< |
new SearchKeysTask<K,V,U>(this, b >>>= 1, |
5265 |
> |
new SearchKeysTask<K,V,U>(map, this, b >>>= 1, |
5266 |
|
searchFunction, result).fork(); |
5267 |
|
} |
5268 |
|
U u; |
5287 |
|
final Fun<? super V, ? extends U> searchFunction; |
5288 |
|
final AtomicReference<U> result; |
5289 |
|
SearchValuesTask |
5290 |
< |
(ConcurrentHashMapV8<K,V> m, |
5290 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5291 |
|
Fun<? super V, ? extends U> searchFunction, |
5292 |
|
AtomicReference<U> result) { |
5293 |
< |
super(m); |
5322 |
< |
this.searchFunction = searchFunction; this.result = result; |
5323 |
< |
} |
5324 |
< |
SearchValuesTask |
5325 |
< |
(BulkTask<K,V,?> p, int b, |
5326 |
< |
Fun<? super V, ? extends U> searchFunction, |
5327 |
< |
AtomicReference<U> result) { |
5328 |
< |
super(p, b); |
5293 |
> |
super(m, p, b); |
5294 |
|
this.searchFunction = searchFunction; this.result = result; |
5295 |
|
} |
5296 |
|
@SuppressWarnings("unchecked") public final boolean exec() { |
5303 |
|
int b = batch(), c; |
5304 |
|
while (b > 1 && baseIndex != baseLimit && result.get() == null) { |
5305 |
|
do {} while (!casPending(c = pending, c+1)); |
5306 |
< |
new SearchValuesTask<K,V,U>(this, b >>>= 1, |
5306 |
> |
new SearchValuesTask<K,V,U>(map, this, b >>>= 1, |
5307 |
|
searchFunction, result).fork(); |
5308 |
|
} |
5309 |
|
Object v; U u; |
5328 |
|
final Fun<Entry<K,V>, ? extends U> searchFunction; |
5329 |
|
final AtomicReference<U> result; |
5330 |
|
SearchEntriesTask |
5331 |
< |
(ConcurrentHashMapV8<K,V> m, |
5367 |
< |
Fun<Entry<K,V>, ? extends U> searchFunction, |
5368 |
< |
AtomicReference<U> result) { |
5369 |
< |
super(m); |
5370 |
< |
this.searchFunction = searchFunction; this.result = result; |
5371 |
< |
} |
5372 |
< |
SearchEntriesTask |
5373 |
< |
(BulkTask<K,V,?> p, int b, |
5331 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5332 |
|
Fun<Entry<K,V>, ? extends U> searchFunction, |
5333 |
|
AtomicReference<U> result) { |
5334 |
< |
super(p, b); |
5334 |
> |
super(m, p, b); |
5335 |
|
this.searchFunction = searchFunction; this.result = result; |
5336 |
|
} |
5337 |
|
@SuppressWarnings("unchecked") public final boolean exec() { |
5344 |
|
int b = batch(), c; |
5345 |
|
while (b > 1 && baseIndex != baseLimit && result.get() == null) { |
5346 |
|
do {} while (!casPending(c = pending, c+1)); |
5347 |
< |
new SearchEntriesTask<K,V,U>(this, b >>>= 1, |
5347 |
> |
new SearchEntriesTask<K,V,U>(map, this, b >>>= 1, |
5348 |
|
searchFunction, result).fork(); |
5349 |
|
} |
5350 |
|
Object v; U u; |
5369 |
|
final BiFun<? super K, ? super V, ? extends U> searchFunction; |
5370 |
|
final AtomicReference<U> result; |
5371 |
|
SearchMappingsTask |
5372 |
< |
(ConcurrentHashMapV8<K,V> m, |
5415 |
< |
BiFun<? super K, ? super V, ? extends U> searchFunction, |
5416 |
< |
AtomicReference<U> result) { |
5417 |
< |
super(m); |
5418 |
< |
this.searchFunction = searchFunction; this.result = result; |
5419 |
< |
} |
5420 |
< |
SearchMappingsTask |
5421 |
< |
(BulkTask<K,V,?> p, int b, |
5372 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5373 |
|
BiFun<? super K, ? super V, ? extends U> searchFunction, |
5374 |
|
AtomicReference<U> result) { |
5375 |
< |
super(p, b); |
5375 |
> |
super(m, p, b); |
5376 |
|
this.searchFunction = searchFunction; this.result = result; |
5377 |
|
} |
5378 |
|
@SuppressWarnings("unchecked") public final boolean exec() { |
5385 |
|
int b = batch(), c; |
5386 |
|
while (b > 1 && baseIndex != baseLimit && result.get() == null) { |
5387 |
|
do {} while (!casPending(c = pending, c+1)); |
5388 |
< |
new SearchMappingsTask<K,V,U>(this, b >>>= 1, |
5388 |
> |
new SearchMappingsTask<K,V,U>(map, this, b >>>= 1, |
5389 |
|
searchFunction, result).fork(); |
5390 |
|
} |
5391 |
|
Object v; U u; |
5411 |
|
K result; |
5412 |
|
ReduceKeysTask<K,V> rights, nextRight; |
5413 |
|
ReduceKeysTask |
5414 |
< |
(ConcurrentHashMapV8<K,V> m, |
5464 |
< |
BiFun<? super K, ? super K, ? extends K> reducer) { |
5465 |
< |
super(m); |
5466 |
< |
this.reducer = reducer; |
5467 |
< |
} |
5468 |
< |
ReduceKeysTask |
5469 |
< |
(BulkTask<K,V,?> p, int b, |
5414 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5415 |
|
ReduceKeysTask<K,V> nextRight, |
5416 |
|
BiFun<? super K, ? super K, ? extends K> reducer) { |
5417 |
< |
super(p, b); this.nextRight = nextRight; |
5417 |
> |
super(m, p, b); this.nextRight = nextRight; |
5418 |
|
this.reducer = reducer; |
5419 |
|
} |
5475 |
– |
|
5420 |
|
@SuppressWarnings("unchecked") public final boolean exec() { |
5421 |
|
final BiFun<? super K, ? super K, ? extends K> reducer = |
5422 |
|
this.reducer; |
5426 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
5427 |
|
do {} while (!casPending(c = pending, c+1)); |
5428 |
|
(rights = new ReduceKeysTask<K,V> |
5429 |
< |
(this, b >>>= 1, rights, reducer)).fork(); |
5429 |
> |
(map, this, b >>>= 1, rights, reducer)).fork(); |
5430 |
|
} |
5431 |
|
K r = null; |
5432 |
|
while (advance() != null) { |
5439 |
|
if ((c = t.pending) == 0) { |
5440 |
|
for (s = t.rights; s != null; s = t.rights = s.nextRight) { |
5441 |
|
if ((sr = s.result) != null) |
5442 |
< |
t.result = (tr = t.result) == null? sr : reducer.apply(tr, sr); |
5442 |
> |
t.result = ((tr = t.result) == null) ? sr : reducer.apply(tr, sr); |
5443 |
|
} |
5444 |
|
if ((par = t.parent) == null || |
5445 |
|
!(par instanceof ReduceKeysTask)) { |
5465 |
|
V result; |
5466 |
|
ReduceValuesTask<K,V> rights, nextRight; |
5467 |
|
ReduceValuesTask |
5468 |
< |
(ConcurrentHashMapV8<K,V> m, |
5525 |
< |
BiFun<? super V, ? super V, ? extends V> reducer) { |
5526 |
< |
super(m); |
5527 |
< |
this.reducer = reducer; |
5528 |
< |
} |
5529 |
< |
ReduceValuesTask |
5530 |
< |
(BulkTask<K,V,?> p, int b, |
5468 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5469 |
|
ReduceValuesTask<K,V> nextRight, |
5470 |
|
BiFun<? super V, ? super V, ? extends V> reducer) { |
5471 |
< |
super(p, b); this.nextRight = nextRight; |
5471 |
> |
super(m, p, b); this.nextRight = nextRight; |
5472 |
|
this.reducer = reducer; |
5473 |
|
} |
5536 |
– |
|
5474 |
|
@SuppressWarnings("unchecked") public final boolean exec() { |
5475 |
|
final BiFun<? super V, ? super V, ? extends V> reducer = |
5476 |
|
this.reducer; |
5480 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
5481 |
|
do {} while (!casPending(c = pending, c+1)); |
5482 |
|
(rights = new ReduceValuesTask<K,V> |
5483 |
< |
(this, b >>>= 1, rights, reducer)).fork(); |
5483 |
> |
(map, this, b >>>= 1, rights, reducer)).fork(); |
5484 |
|
} |
5485 |
|
V r = null; |
5486 |
|
Object v; |
5494 |
|
if ((c = t.pending) == 0) { |
5495 |
|
for (s = t.rights; s != null; s = t.rights = s.nextRight) { |
5496 |
|
if ((sr = s.result) != null) |
5497 |
< |
t.result = (tr = t.result) == null? sr : reducer.apply(tr, sr); |
5497 |
> |
t.result = ((tr = t.result) == null) ? sr : reducer.apply(tr, sr); |
5498 |
|
} |
5499 |
|
if ((par = t.parent) == null || |
5500 |
|
!(par instanceof ReduceValuesTask)) { |
5520 |
|
Map.Entry<K,V> result; |
5521 |
|
ReduceEntriesTask<K,V> rights, nextRight; |
5522 |
|
ReduceEntriesTask |
5523 |
< |
(ConcurrentHashMapV8<K,V> m, |
5587 |
< |
BiFun<Entry<K,V>, Map.Entry<K,V>, ? extends Map.Entry<K,V>> reducer) { |
5588 |
< |
super(m); |
5589 |
< |
this.reducer = reducer; |
5590 |
< |
} |
5591 |
< |
ReduceEntriesTask |
5592 |
< |
(BulkTask<K,V,?> p, int b, |
5523 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5524 |
|
ReduceEntriesTask<K,V> nextRight, |
5525 |
< |
BiFun<Map.Entry<K,V>, Map.Entry<K,V>, ? extends Map.Entry<K,V>> reducer) { |
5526 |
< |
super(p, b); this.nextRight = nextRight; |
5525 |
> |
BiFun<Entry<K,V>, Map.Entry<K,V>, ? extends Map.Entry<K,V>> reducer) { |
5526 |
> |
super(m, p, b); this.nextRight = nextRight; |
5527 |
|
this.reducer = reducer; |
5528 |
|
} |
5598 |
– |
|
5529 |
|
@SuppressWarnings("unchecked") public final boolean exec() { |
5530 |
|
final BiFun<Map.Entry<K,V>, Map.Entry<K,V>, ? extends Map.Entry<K,V>> reducer = |
5531 |
|
this.reducer; |
5535 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
5536 |
|
do {} while (!casPending(c = pending, c+1)); |
5537 |
|
(rights = new ReduceEntriesTask<K,V> |
5538 |
< |
(this, b >>>= 1, rights, reducer)).fork(); |
5538 |
> |
(map, this, b >>>= 1, rights, reducer)).fork(); |
5539 |
|
} |
5540 |
|
Map.Entry<K,V> r = null; |
5541 |
|
Object v; |
5549 |
|
if ((c = t.pending) == 0) { |
5550 |
|
for (s = t.rights; s != null; s = t.rights = s.nextRight) { |
5551 |
|
if ((sr = s.result) != null) |
5552 |
< |
t.result = (tr = t.result) == null? sr : reducer.apply(tr, sr); |
5552 |
> |
t.result = ((tr = t.result) == null) ? sr : reducer.apply(tr, sr); |
5553 |
|
} |
5554 |
|
if ((par = t.parent) == null || |
5555 |
|
!(par instanceof ReduceEntriesTask)) { |
5576 |
|
U result; |
5577 |
|
MapReduceKeysTask<K,V,U> rights, nextRight; |
5578 |
|
MapReduceKeysTask |
5579 |
< |
(ConcurrentHashMapV8<K,V> m, |
5650 |
< |
Fun<? super K, ? extends U> transformer, |
5651 |
< |
BiFun<? super U, ? super U, ? extends U> reducer) { |
5652 |
< |
super(m); |
5653 |
< |
this.transformer = transformer; |
5654 |
< |
this.reducer = reducer; |
5655 |
< |
} |
5656 |
< |
MapReduceKeysTask |
5657 |
< |
(BulkTask<K,V,?> p, int b, |
5579 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5580 |
|
MapReduceKeysTask<K,V,U> nextRight, |
5581 |
|
Fun<? super K, ? extends U> transformer, |
5582 |
|
BiFun<? super U, ? super U, ? extends U> reducer) { |
5583 |
< |
super(p, b); this.nextRight = nextRight; |
5583 |
> |
super(m, p, b); this.nextRight = nextRight; |
5584 |
|
this.transformer = transformer; |
5585 |
|
this.reducer = reducer; |
5586 |
|
} |
5595 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
5596 |
|
do {} while (!casPending(c = pending, c+1)); |
5597 |
|
(rights = new MapReduceKeysTask<K,V,U> |
5598 |
< |
(this, b >>>= 1, rights, transformer, reducer)).fork(); |
5598 |
> |
(map, this, b >>>= 1, rights, transformer, reducer)).fork(); |
5599 |
|
} |
5600 |
|
U r = null, u; |
5601 |
|
while (advance() != null) { |
5608 |
|
if ((c = t.pending) == 0) { |
5609 |
|
for (s = t.rights; s != null; s = t.rights = s.nextRight) { |
5610 |
|
if ((sr = s.result) != null) |
5611 |
< |
t.result = (tr = t.result) == null? sr : reducer.apply(tr, sr); |
5611 |
> |
t.result = ((tr = t.result) == null) ? sr : reducer.apply(tr, sr); |
5612 |
|
} |
5613 |
|
if ((par = t.parent) == null || |
5614 |
|
!(par instanceof MapReduceKeysTask)) { |
5635 |
|
U result; |
5636 |
|
MapReduceValuesTask<K,V,U> rights, nextRight; |
5637 |
|
MapReduceValuesTask |
5638 |
< |
(ConcurrentHashMapV8<K,V> m, |
5717 |
< |
Fun<? super V, ? extends U> transformer, |
5718 |
< |
BiFun<? super U, ? super U, ? extends U> reducer) { |
5719 |
< |
super(m); |
5720 |
< |
this.transformer = transformer; |
5721 |
< |
this.reducer = reducer; |
5722 |
< |
} |
5723 |
< |
MapReduceValuesTask |
5724 |
< |
(BulkTask<K,V,?> p, int b, |
5638 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5639 |
|
MapReduceValuesTask<K,V,U> nextRight, |
5640 |
|
Fun<? super V, ? extends U> transformer, |
5641 |
|
BiFun<? super U, ? super U, ? extends U> reducer) { |
5642 |
< |
super(p, b); this.nextRight = nextRight; |
5642 |
> |
super(m, p, b); this.nextRight = nextRight; |
5643 |
|
this.transformer = transformer; |
5644 |
|
this.reducer = reducer; |
5645 |
|
} |
5654 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
5655 |
|
do {} while (!casPending(c = pending, c+1)); |
5656 |
|
(rights = new MapReduceValuesTask<K,V,U> |
5657 |
< |
(this, b >>>= 1, rights, transformer, reducer)).fork(); |
5657 |
> |
(map, this, b >>>= 1, rights, transformer, reducer)).fork(); |
5658 |
|
} |
5659 |
|
U r = null, u; |
5660 |
|
Object v; |
5668 |
|
if ((c = t.pending) == 0) { |
5669 |
|
for (s = t.rights; s != null; s = t.rights = s.nextRight) { |
5670 |
|
if ((sr = s.result) != null) |
5671 |
< |
t.result = (tr = t.result) == null? sr : reducer.apply(tr, sr); |
5671 |
> |
t.result = ((tr = t.result) == null) ? sr : reducer.apply(tr, sr); |
5672 |
|
} |
5673 |
|
if ((par = t.parent) == null || |
5674 |
|
!(par instanceof MapReduceValuesTask)) { |
5695 |
|
U result; |
5696 |
|
MapReduceEntriesTask<K,V,U> rights, nextRight; |
5697 |
|
MapReduceEntriesTask |
5698 |
< |
(ConcurrentHashMapV8<K,V> m, |
5785 |
< |
Fun<Map.Entry<K,V>, ? extends U> transformer, |
5786 |
< |
BiFun<? super U, ? super U, ? extends U> reducer) { |
5787 |
< |
super(m); |
5788 |
< |
this.transformer = transformer; |
5789 |
< |
this.reducer = reducer; |
5790 |
< |
} |
5791 |
< |
MapReduceEntriesTask |
5792 |
< |
(BulkTask<K,V,?> p, int b, |
5698 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5699 |
|
MapReduceEntriesTask<K,V,U> nextRight, |
5700 |
|
Fun<Map.Entry<K,V>, ? extends U> transformer, |
5701 |
|
BiFun<? super U, ? super U, ? extends U> reducer) { |
5702 |
< |
super(p, b); this.nextRight = nextRight; |
5702 |
> |
super(m, p, b); this.nextRight = nextRight; |
5703 |
|
this.transformer = transformer; |
5704 |
|
this.reducer = reducer; |
5705 |
|
} |
5714 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
5715 |
|
do {} while (!casPending(c = pending, c+1)); |
5716 |
|
(rights = new MapReduceEntriesTask<K,V,U> |
5717 |
< |
(this, b >>>= 1, rights, transformer, reducer)).fork(); |
5717 |
> |
(map, this, b >>>= 1, rights, transformer, reducer)).fork(); |
5718 |
|
} |
5719 |
|
U r = null, u; |
5720 |
|
Object v; |
5728 |
|
if ((c = t.pending) == 0) { |
5729 |
|
for (s = t.rights; s != null; s = t.rights = s.nextRight) { |
5730 |
|
if ((sr = s.result) != null) |
5731 |
< |
t.result = (tr = t.result) == null? sr : reducer.apply(tr, sr); |
5731 |
> |
t.result = ((tr = t.result) == null) ? sr : reducer.apply(tr, sr); |
5732 |
|
} |
5733 |
|
if ((par = t.parent) == null || |
5734 |
|
!(par instanceof MapReduceEntriesTask)) { |
5755 |
|
U result; |
5756 |
|
MapReduceMappingsTask<K,V,U> rights, nextRight; |
5757 |
|
MapReduceMappingsTask |
5758 |
< |
(ConcurrentHashMapV8<K,V> m, |
5853 |
< |
BiFun<? super K, ? super V, ? extends U> transformer, |
5854 |
< |
BiFun<? super U, ? super U, ? extends U> reducer) { |
5855 |
< |
super(m); |
5856 |
< |
this.transformer = transformer; |
5857 |
< |
this.reducer = reducer; |
5858 |
< |
} |
5859 |
< |
MapReduceMappingsTask |
5860 |
< |
(BulkTask<K,V,?> p, int b, |
5758 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5759 |
|
MapReduceMappingsTask<K,V,U> nextRight, |
5760 |
|
BiFun<? super K, ? super V, ? extends U> transformer, |
5761 |
|
BiFun<? super U, ? super U, ? extends U> reducer) { |
5762 |
< |
super(p, b); this.nextRight = nextRight; |
5762 |
> |
super(m, p, b); this.nextRight = nextRight; |
5763 |
|
this.transformer = transformer; |
5764 |
|
this.reducer = reducer; |
5765 |
|
} |
5774 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
5775 |
|
do {} while (!casPending(c = pending, c+1)); |
5776 |
|
(rights = new MapReduceMappingsTask<K,V,U> |
5777 |
< |
(this, b >>>= 1, rights, transformer, reducer)).fork(); |
5777 |
> |
(map, this, b >>>= 1, rights, transformer, reducer)).fork(); |
5778 |
|
} |
5779 |
|
U r = null, u; |
5780 |
|
Object v; |
5788 |
|
if ((c = t.pending) == 0) { |
5789 |
|
for (s = t.rights; s != null; s = t.rights = s.nextRight) { |
5790 |
|
if ((sr = s.result) != null) |
5791 |
< |
t.result = (tr = t.result) == null? sr : reducer.apply(tr, sr); |
5791 |
> |
t.result = ((tr = t.result) == null) ? sr : reducer.apply(tr, sr); |
5792 |
|
} |
5793 |
|
if ((par = t.parent) == null || |
5794 |
|
!(par instanceof MapReduceMappingsTask)) { |
5816 |
|
double result; |
5817 |
|
MapReduceKeysToDoubleTask<K,V> rights, nextRight; |
5818 |
|
MapReduceKeysToDoubleTask |
5819 |
< |
(ConcurrentHashMapV8<K,V> m, |
5922 |
< |
ObjectToDouble<? super K> transformer, |
5923 |
< |
double basis, |
5924 |
< |
DoubleByDoubleToDouble reducer) { |
5925 |
< |
super(m); |
5926 |
< |
this.transformer = transformer; |
5927 |
< |
this.basis = basis; this.reducer = reducer; |
5928 |
< |
} |
5929 |
< |
MapReduceKeysToDoubleTask |
5930 |
< |
(BulkTask<K,V,?> p, int b, |
5819 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5820 |
|
MapReduceKeysToDoubleTask<K,V> nextRight, |
5821 |
|
ObjectToDouble<? super K> transformer, |
5822 |
|
double basis, |
5823 |
|
DoubleByDoubleToDouble reducer) { |
5824 |
< |
super(p, b); this.nextRight = nextRight; |
5824 |
> |
super(m, p, b); this.nextRight = nextRight; |
5825 |
|
this.transformer = transformer; |
5826 |
|
this.basis = basis; this.reducer = reducer; |
5827 |
|
} |
5836 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
5837 |
|
do {} while (!casPending(c = pending, c+1)); |
5838 |
|
(rights = new MapReduceKeysToDoubleTask<K,V> |
5839 |
< |
(this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
5839 |
> |
(map, this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
5840 |
|
} |
5841 |
|
double r = id; |
5842 |
|
while (advance() != null) |
5874 |
|
double result; |
5875 |
|
MapReduceValuesToDoubleTask<K,V> rights, nextRight; |
5876 |
|
MapReduceValuesToDoubleTask |
5877 |
< |
(ConcurrentHashMapV8<K,V> m, |
5989 |
< |
ObjectToDouble<? super V> transformer, |
5990 |
< |
double basis, |
5991 |
< |
DoubleByDoubleToDouble reducer) { |
5992 |
< |
super(m); |
5993 |
< |
this.transformer = transformer; |
5994 |
< |
this.basis = basis; this.reducer = reducer; |
5995 |
< |
} |
5996 |
< |
MapReduceValuesToDoubleTask |
5997 |
< |
(BulkTask<K,V,?> p, int b, |
5877 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5878 |
|
MapReduceValuesToDoubleTask<K,V> nextRight, |
5879 |
|
ObjectToDouble<? super V> transformer, |
5880 |
|
double basis, |
5881 |
|
DoubleByDoubleToDouble reducer) { |
5882 |
< |
super(p, b); this.nextRight = nextRight; |
5882 |
> |
super(m, p, b); this.nextRight = nextRight; |
5883 |
|
this.transformer = transformer; |
5884 |
|
this.basis = basis; this.reducer = reducer; |
5885 |
|
} |
5894 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
5895 |
|
do {} while (!casPending(c = pending, c+1)); |
5896 |
|
(rights = new MapReduceValuesToDoubleTask<K,V> |
5897 |
< |
(this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
5897 |
> |
(map, this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
5898 |
|
} |
5899 |
|
double r = id; |
5900 |
|
Object v; |
5933 |
|
double result; |
5934 |
|
MapReduceEntriesToDoubleTask<K,V> rights, nextRight; |
5935 |
|
MapReduceEntriesToDoubleTask |
5936 |
< |
(ConcurrentHashMapV8<K,V> m, |
6057 |
< |
ObjectToDouble<Map.Entry<K,V>> transformer, |
6058 |
< |
double basis, |
6059 |
< |
DoubleByDoubleToDouble reducer) { |
6060 |
< |
super(m); |
6061 |
< |
this.transformer = transformer; |
6062 |
< |
this.basis = basis; this.reducer = reducer; |
6063 |
< |
} |
6064 |
< |
MapReduceEntriesToDoubleTask |
6065 |
< |
(BulkTask<K,V,?> p, int b, |
5936 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5937 |
|
MapReduceEntriesToDoubleTask<K,V> nextRight, |
5938 |
|
ObjectToDouble<Map.Entry<K,V>> transformer, |
5939 |
|
double basis, |
5940 |
|
DoubleByDoubleToDouble reducer) { |
5941 |
< |
super(p, b); this.nextRight = nextRight; |
5941 |
> |
super(m, p, b); this.nextRight = nextRight; |
5942 |
|
this.transformer = transformer; |
5943 |
|
this.basis = basis; this.reducer = reducer; |
5944 |
|
} |
5953 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
5954 |
|
do {} while (!casPending(c = pending, c+1)); |
5955 |
|
(rights = new MapReduceEntriesToDoubleTask<K,V> |
5956 |
< |
(this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
5956 |
> |
(map, this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
5957 |
|
} |
5958 |
|
double r = id; |
5959 |
|
Object v; |
5992 |
|
double result; |
5993 |
|
MapReduceMappingsToDoubleTask<K,V> rights, nextRight; |
5994 |
|
MapReduceMappingsToDoubleTask |
5995 |
< |
(ConcurrentHashMapV8<K,V> m, |
6125 |
< |
ObjectByObjectToDouble<? super K, ? super V> transformer, |
6126 |
< |
double basis, |
6127 |
< |
DoubleByDoubleToDouble reducer) { |
6128 |
< |
super(m); |
6129 |
< |
this.transformer = transformer; |
6130 |
< |
this.basis = basis; this.reducer = reducer; |
6131 |
< |
} |
6132 |
< |
MapReduceMappingsToDoubleTask |
6133 |
< |
(BulkTask<K,V,?> p, int b, |
5995 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
5996 |
|
MapReduceMappingsToDoubleTask<K,V> nextRight, |
5997 |
|
ObjectByObjectToDouble<? super K, ? super V> transformer, |
5998 |
|
double basis, |
5999 |
|
DoubleByDoubleToDouble reducer) { |
6000 |
< |
super(p, b); this.nextRight = nextRight; |
6000 |
> |
super(m, p, b); this.nextRight = nextRight; |
6001 |
|
this.transformer = transformer; |
6002 |
|
this.basis = basis; this.reducer = reducer; |
6003 |
|
} |
6012 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
6013 |
|
do {} while (!casPending(c = pending, c+1)); |
6014 |
|
(rights = new MapReduceMappingsToDoubleTask<K,V> |
6015 |
< |
(this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6015 |
> |
(map, this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6016 |
|
} |
6017 |
|
double r = id; |
6018 |
|
Object v; |
6051 |
|
long result; |
6052 |
|
MapReduceKeysToLongTask<K,V> rights, nextRight; |
6053 |
|
MapReduceKeysToLongTask |
6054 |
< |
(ConcurrentHashMapV8<K,V> m, |
6193 |
< |
ObjectToLong<? super K> transformer, |
6194 |
< |
long basis, |
6195 |
< |
LongByLongToLong reducer) { |
6196 |
< |
super(m); |
6197 |
< |
this.transformer = transformer; |
6198 |
< |
this.basis = basis; this.reducer = reducer; |
6199 |
< |
} |
6200 |
< |
MapReduceKeysToLongTask |
6201 |
< |
(BulkTask<K,V,?> p, int b, |
6054 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
6055 |
|
MapReduceKeysToLongTask<K,V> nextRight, |
6056 |
|
ObjectToLong<? super K> transformer, |
6057 |
|
long basis, |
6058 |
|
LongByLongToLong reducer) { |
6059 |
< |
super(p, b); this.nextRight = nextRight; |
6059 |
> |
super(m, p, b); this.nextRight = nextRight; |
6060 |
|
this.transformer = transformer; |
6061 |
|
this.basis = basis; this.reducer = reducer; |
6062 |
|
} |
6071 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
6072 |
|
do {} while (!casPending(c = pending, c+1)); |
6073 |
|
(rights = new MapReduceKeysToLongTask<K,V> |
6074 |
< |
(this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6074 |
> |
(map, this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6075 |
|
} |
6076 |
|
long r = id; |
6077 |
|
while (advance() != null) |
6109 |
|
long result; |
6110 |
|
MapReduceValuesToLongTask<K,V> rights, nextRight; |
6111 |
|
MapReduceValuesToLongTask |
6112 |
< |
(ConcurrentHashMapV8<K,V> m, |
6260 |
< |
ObjectToLong<? super V> transformer, |
6261 |
< |
long basis, |
6262 |
< |
LongByLongToLong reducer) { |
6263 |
< |
super(m); |
6264 |
< |
this.transformer = transformer; |
6265 |
< |
this.basis = basis; this.reducer = reducer; |
6266 |
< |
} |
6267 |
< |
MapReduceValuesToLongTask |
6268 |
< |
(BulkTask<K,V,?> p, int b, |
6112 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
6113 |
|
MapReduceValuesToLongTask<K,V> nextRight, |
6114 |
|
ObjectToLong<? super V> transformer, |
6115 |
|
long basis, |
6116 |
|
LongByLongToLong reducer) { |
6117 |
< |
super(p, b); this.nextRight = nextRight; |
6117 |
> |
super(m, p, b); this.nextRight = nextRight; |
6118 |
|
this.transformer = transformer; |
6119 |
|
this.basis = basis; this.reducer = reducer; |
6120 |
|
} |
6129 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
6130 |
|
do {} while (!casPending(c = pending, c+1)); |
6131 |
|
(rights = new MapReduceValuesToLongTask<K,V> |
6132 |
< |
(this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6132 |
> |
(map, this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6133 |
|
} |
6134 |
|
long r = id; |
6135 |
|
Object v; |
6168 |
|
long result; |
6169 |
|
MapReduceEntriesToLongTask<K,V> rights, nextRight; |
6170 |
|
MapReduceEntriesToLongTask |
6171 |
< |
(ConcurrentHashMapV8<K,V> m, |
6328 |
< |
ObjectToLong<Map.Entry<K,V>> transformer, |
6329 |
< |
long basis, |
6330 |
< |
LongByLongToLong reducer) { |
6331 |
< |
super(m); |
6332 |
< |
this.transformer = transformer; |
6333 |
< |
this.basis = basis; this.reducer = reducer; |
6334 |
< |
} |
6335 |
< |
MapReduceEntriesToLongTask |
6336 |
< |
(BulkTask<K,V,?> p, int b, |
6171 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
6172 |
|
MapReduceEntriesToLongTask<K,V> nextRight, |
6173 |
|
ObjectToLong<Map.Entry<K,V>> transformer, |
6174 |
|
long basis, |
6175 |
|
LongByLongToLong reducer) { |
6176 |
< |
super(p, b); this.nextRight = nextRight; |
6176 |
> |
super(m, p, b); this.nextRight = nextRight; |
6177 |
|
this.transformer = transformer; |
6178 |
|
this.basis = basis; this.reducer = reducer; |
6179 |
|
} |
6188 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
6189 |
|
do {} while (!casPending(c = pending, c+1)); |
6190 |
|
(rights = new MapReduceEntriesToLongTask<K,V> |
6191 |
< |
(this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6191 |
> |
(map, this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6192 |
|
} |
6193 |
|
long r = id; |
6194 |
|
Object v; |
6227 |
|
long result; |
6228 |
|
MapReduceMappingsToLongTask<K,V> rights, nextRight; |
6229 |
|
MapReduceMappingsToLongTask |
6230 |
< |
(ConcurrentHashMapV8<K,V> m, |
6396 |
< |
ObjectByObjectToLong<? super K, ? super V> transformer, |
6397 |
< |
long basis, |
6398 |
< |
LongByLongToLong reducer) { |
6399 |
< |
super(m); |
6400 |
< |
this.transformer = transformer; |
6401 |
< |
this.basis = basis; this.reducer = reducer; |
6402 |
< |
} |
6403 |
< |
MapReduceMappingsToLongTask |
6404 |
< |
(BulkTask<K,V,?> p, int b, |
6230 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
6231 |
|
MapReduceMappingsToLongTask<K,V> nextRight, |
6232 |
|
ObjectByObjectToLong<? super K, ? super V> transformer, |
6233 |
|
long basis, |
6234 |
|
LongByLongToLong reducer) { |
6235 |
< |
super(p, b); this.nextRight = nextRight; |
6235 |
> |
super(m, p, b); this.nextRight = nextRight; |
6236 |
|
this.transformer = transformer; |
6237 |
|
this.basis = basis; this.reducer = reducer; |
6238 |
|
} |
6247 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
6248 |
|
do {} while (!casPending(c = pending, c+1)); |
6249 |
|
(rights = new MapReduceMappingsToLongTask<K,V> |
6250 |
< |
(this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6250 |
> |
(map, this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6251 |
|
} |
6252 |
|
long r = id; |
6253 |
|
Object v; |
6286 |
|
int result; |
6287 |
|
MapReduceKeysToIntTask<K,V> rights, nextRight; |
6288 |
|
MapReduceKeysToIntTask |
6289 |
< |
(ConcurrentHashMapV8<K,V> m, |
6464 |
< |
ObjectToInt<? super K> transformer, |
6465 |
< |
int basis, |
6466 |
< |
IntByIntToInt reducer) { |
6467 |
< |
super(m); |
6468 |
< |
this.transformer = transformer; |
6469 |
< |
this.basis = basis; this.reducer = reducer; |
6470 |
< |
} |
6471 |
< |
MapReduceKeysToIntTask |
6472 |
< |
(BulkTask<K,V,?> p, int b, |
6289 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
6290 |
|
MapReduceKeysToIntTask<K,V> nextRight, |
6291 |
|
ObjectToInt<? super K> transformer, |
6292 |
|
int basis, |
6293 |
|
IntByIntToInt reducer) { |
6294 |
< |
super(p, b); this.nextRight = nextRight; |
6294 |
> |
super(m, p, b); this.nextRight = nextRight; |
6295 |
|
this.transformer = transformer; |
6296 |
|
this.basis = basis; this.reducer = reducer; |
6297 |
|
} |
6306 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
6307 |
|
do {} while (!casPending(c = pending, c+1)); |
6308 |
|
(rights = new MapReduceKeysToIntTask<K,V> |
6309 |
< |
(this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6309 |
> |
(map, this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6310 |
|
} |
6311 |
|
int r = id; |
6312 |
|
while (advance() != null) |
6344 |
|
int result; |
6345 |
|
MapReduceValuesToIntTask<K,V> rights, nextRight; |
6346 |
|
MapReduceValuesToIntTask |
6347 |
< |
(ConcurrentHashMapV8<K,V> m, |
6531 |
< |
ObjectToInt<? super V> transformer, |
6532 |
< |
int basis, |
6533 |
< |
IntByIntToInt reducer) { |
6534 |
< |
super(m); |
6535 |
< |
this.transformer = transformer; |
6536 |
< |
this.basis = basis; this.reducer = reducer; |
6537 |
< |
} |
6538 |
< |
MapReduceValuesToIntTask |
6539 |
< |
(BulkTask<K,V,?> p, int b, |
6347 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
6348 |
|
MapReduceValuesToIntTask<K,V> nextRight, |
6349 |
|
ObjectToInt<? super V> transformer, |
6350 |
|
int basis, |
6351 |
|
IntByIntToInt reducer) { |
6352 |
< |
super(p, b); this.nextRight = nextRight; |
6352 |
> |
super(m, p, b); this.nextRight = nextRight; |
6353 |
|
this.transformer = transformer; |
6354 |
|
this.basis = basis; this.reducer = reducer; |
6355 |
|
} |
6364 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
6365 |
|
do {} while (!casPending(c = pending, c+1)); |
6366 |
|
(rights = new MapReduceValuesToIntTask<K,V> |
6367 |
< |
(this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6367 |
> |
(map, this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6368 |
|
} |
6369 |
|
int r = id; |
6370 |
|
Object v; |
6403 |
|
int result; |
6404 |
|
MapReduceEntriesToIntTask<K,V> rights, nextRight; |
6405 |
|
MapReduceEntriesToIntTask |
6406 |
< |
(ConcurrentHashMapV8<K,V> m, |
6599 |
< |
ObjectToInt<Map.Entry<K,V>> transformer, |
6600 |
< |
int basis, |
6601 |
< |
IntByIntToInt reducer) { |
6602 |
< |
super(m); |
6603 |
< |
this.transformer = transformer; |
6604 |
< |
this.basis = basis; this.reducer = reducer; |
6605 |
< |
} |
6606 |
< |
MapReduceEntriesToIntTask |
6607 |
< |
(BulkTask<K,V,?> p, int b, |
6406 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
6407 |
|
MapReduceEntriesToIntTask<K,V> nextRight, |
6408 |
|
ObjectToInt<Map.Entry<K,V>> transformer, |
6409 |
|
int basis, |
6410 |
|
IntByIntToInt reducer) { |
6411 |
< |
super(p, b); this.nextRight = nextRight; |
6411 |
> |
super(m, p, b); this.nextRight = nextRight; |
6412 |
|
this.transformer = transformer; |
6413 |
|
this.basis = basis; this.reducer = reducer; |
6414 |
|
} |
6423 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
6424 |
|
do {} while (!casPending(c = pending, c+1)); |
6425 |
|
(rights = new MapReduceEntriesToIntTask<K,V> |
6426 |
< |
(this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6426 |
> |
(map, this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6427 |
|
} |
6428 |
|
int r = id; |
6429 |
|
Object v; |
6462 |
|
int result; |
6463 |
|
MapReduceMappingsToIntTask<K,V> rights, nextRight; |
6464 |
|
MapReduceMappingsToIntTask |
6465 |
< |
(ConcurrentHashMapV8<K,V> m, |
6466 |
< |
ObjectByObjectToInt<? super K, ? super V> transformer, |
6668 |
< |
int basis, |
6669 |
< |
IntByIntToInt reducer) { |
6670 |
< |
super(m); |
6671 |
< |
this.transformer = transformer; |
6672 |
< |
this.basis = basis; this.reducer = reducer; |
6673 |
< |
} |
6674 |
< |
MapReduceMappingsToIntTask |
6675 |
< |
(BulkTask<K,V,?> p, int b, |
6676 |
< |
MapReduceMappingsToIntTask<K,V> nextRight, |
6465 |
> |
(ConcurrentHashMapV8<K,V> m, BulkTask<K,V,?> p, int b, |
6466 |
> |
MapReduceMappingsToIntTask<K,V> rights, |
6467 |
|
ObjectByObjectToInt<? super K, ? super V> transformer, |
6468 |
|
int basis, |
6469 |
|
IntByIntToInt reducer) { |
6470 |
< |
super(p, b); this.nextRight = nextRight; |
6470 |
> |
super(m, p, b); this.nextRight = nextRight; |
6471 |
|
this.transformer = transformer; |
6472 |
|
this.basis = basis; this.reducer = reducer; |
6473 |
|
} |
6482 |
|
for (int c, b = batch(); b > 1 && baseIndex != baseLimit;) { |
6483 |
|
do {} while (!casPending(c = pending, c+1)); |
6484 |
|
(rights = new MapReduceMappingsToIntTask<K,V> |
6485 |
< |
(this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6485 |
> |
(map, this, b >>>= 1, rights, transformer, id, reducer)).fork(); |
6486 |
|
} |
6487 |
|
int r = id; |
6488 |
|
Object v; |