/** * Forces the segment containing the given {@code key} to expand (see {@link Segment#expand()}. */ static <K, V> void forceExpandSegment(Cache<K, V> cache, K key) { checkNotNull(cache); checkNotNull(key); LocalCache<K, V> map = toLocalCache(cache); int hash = map.hash(key); Segment<K, V> segment = map.segmentFor(hash); segment.expand(); }
segment.expand();
segment.expand();
expand(); newCount = this.count + 1;
expand(); newCount = this.count + 1;
expand(); newCount = this.count + 1;
expand(); newCount = this.count + 1;
expand(); newCount = this.count + 1;
expand(); newCount = this.count + 1;
expand(); newCount = this.count + 1;
expand(); newCount = this.count + 1;
expand(); newCount = this.count + 1;
segment.expand();
segment.expand();
/** * Forces the segment containing the given {@code key} to expand (see * {@link Segment#expand()}. */ static <K, V> void forceExpandSegment(Cache<K, V> cache, K key) { checkNotNull(cache); checkNotNull(key); LocalCache<K, V> map = toLocalCache(cache); int hash = map.hash(key); Segment<K, V> segment = map.segmentFor(hash); segment.expand(); }
@Benchmark int time(int reps) { int dummy = 0; AtomicReferenceArray<ReferenceEntry<Object, Object>> oldTable = segment.table; for (int i = 0; i < reps; i++) { segment.expand(); segment.table = oldTable; dummy += segment.count; } return dummy; } }
expand(); newCount = this.count + 1;
expand(); newCount = this.count + 1;
expand(); newCount = this.count + 1;
expand(); newCount = this.count + 1;