cqengine
cqengine copied to clipboard
Support STRICT_REPLACEMENT in ObjectLockingIndexedCollection/ConcurrentIndexedCollection
It would be beneficial if ConcurrentIndexedCollection and ObjectLockingIndexedCollection supported the STRICT_REPLACEMENT feature that is supported in TransactionalIndexedCollection.
The check would not be atomic/transactional in those collections. (In fact it would be susceptible to TOCTOU issues - which would need to be mentioned in documentation for those collections).
Rationale to do this, is that right now, the lack of this feature in all collections can cause different collections to behave differently when this feature is requested and not honoured by all collections, especially when multi-threading is not a factor. So implementing this feature will make the user experience more consistent.