| 298 | Optional<Reference<FlowLock>> flowControlLock; |
| 299 | |
| 300 | IndexPlugin(DataKey collectionPath, Reference<IndexInfo> indexInfo, Reference<ITDoc> next) |
| 301 | : collectionPath(collectionPath), |
| 302 | indexInfo(indexInfo), |
| 303 | indexPath(indexInfo->indexCx->getPrefix()), // dbName+collectionName+"metadata"+"indices"+indexName |
| 304 | ITDoc(next), |
| 305 | multikey(indexInfo->multikey), |
| 306 | isUniqueIndex(indexInfo->isUniqueIndex), |
| 307 | indexName(indexInfo->indexName), |
| 308 | flowControlLock(indexInfo->isUniqueIndex ? Optional<Reference<FlowLock>>(Reference<FlowLock>(new FlowLock(1))) |
| 309 | : Optional<Reference<FlowLock>>()) {} |
| 310 | }; |
| 311 | |
| 312 | struct CompoundIndexPlugin : IndexPlugin, ReferenceCounted<CompoundIndexPlugin>, FastAllocated<CompoundIndexPlugin> { |