(
LocalCache<K, V> map,
int initialCapacity,
long maxSegmentWeight,
StatsCounter statsCounter)
| 2174 | final StatsCounter statsCounter; |
| 2175 | |
| 2176 | Segment( |
| 2177 | LocalCache<K, V> map, |
| 2178 | int initialCapacity, |
| 2179 | long maxSegmentWeight, |
| 2180 | StatsCounter statsCounter) { |
| 2181 | this.map = map; |
| 2182 | this.maxSegmentWeight = maxSegmentWeight; |
| 2183 | this.statsCounter = checkNotNull(statsCounter); |
| 2184 | initTable(newEntryArray(initialCapacity)); |
| 2185 | keyReferenceQueue = map.usesKeyReferences() ? new ReferenceQueue<K>() : null; |
| 2186 | valueReferenceQueue = map.usesValueReferences() ? new ReferenceQueue<V>() : null; |
| 2187 | recencyQueue = map.usesAccessQueue() |
| 2188 | ? new ConcurrentLinkedQueue<ReferenceEntry<K, V>>() |
| 2189 | : LocalCache.<ReferenceEntry<K, V>>discardingQueue(); |
| 2190 | writeQueue = |
| 2191 | map.usesWriteQueue() |
| 2192 | ? new WriteQueue<K, V>() |
| 2193 | : LocalCache.<ReferenceEntry<K, V>>discardingQueue(); |
| 2194 | accessQueue = |
| 2195 | map.usesAccessQueue() |
| 2196 | ? new AccessQueue<K, V>() |
| 2197 | : LocalCache.<ReferenceEntry<K, V>>discardingQueue(); |
| 2198 | } |
| 2199 | |
| 2200 | AtomicReferenceArray<ReferenceEntry<K, V>> newEntryArray(int size) { |
| 2201 | return new AtomicReferenceArray<ReferenceEntry<K, V>>(size); |
nothing calls this directly
no test coverage detected