(
LocalCache<K, V> map,
int initialCapacity,
long maxSegmentWeight,
StatsCounter statsCounter)
| 2094 | final StatsCounter statsCounter; |
| 2095 | |
| 2096 | Segment( |
| 2097 | LocalCache<K, V> map, |
| 2098 | int initialCapacity, |
| 2099 | long maxSegmentWeight, |
| 2100 | StatsCounter statsCounter) { |
| 2101 | this.map = map; |
| 2102 | this.maxSegmentWeight = maxSegmentWeight; |
| 2103 | this.statsCounter = checkNotNull(statsCounter); |
| 2104 | initTable(newEntryArray(initialCapacity)); |
| 2105 | |
| 2106 | keyReferenceQueue = map.usesKeyReferences() ? new ReferenceQueue<K>() : null; |
| 2107 | |
| 2108 | valueReferenceQueue = map.usesValueReferences() ? new ReferenceQueue<V>() : null; |
| 2109 | |
| 2110 | recencyQueue = |
| 2111 | map.usesAccessQueue() |
| 2112 | ? new ConcurrentLinkedQueue<ReferenceEntry<K, V>>() |
| 2113 | : LocalCache.<ReferenceEntry<K, V>>discardingQueue(); |
| 2114 | |
| 2115 | writeQueue = |
| 2116 | map.usesWriteQueue() |
| 2117 | ? new WriteQueue<K, V>() |
| 2118 | : LocalCache.<ReferenceEntry<K, V>>discardingQueue(); |
| 2119 | |
| 2120 | accessQueue = |
| 2121 | map.usesAccessQueue() |
| 2122 | ? new AccessQueue<K, V>() |
| 2123 | : LocalCache.<ReferenceEntry<K, V>>discardingQueue(); |
| 2124 | } |
| 2125 | |
| 2126 | AtomicReferenceArray<ReferenceEntry<K, V>> newEntryArray(int size) { |
| 2127 | return new AtomicReferenceArray<ReferenceEntry<K, V>>(size); |
nothing calls this directly
no test coverage detected