I wish to have a queryable on-heap mirror of some underlying resource. When using CQEngine to index a class not under our control (*), how can we implement a transactional update (what's the point of all this concurrency if readers lose data because of the remove+add semantics!).
(*) TransactionalIndexedCollection
insists on mauling the type's equals
method so that equivalent objects are no longer equals()
!
Also, the provided equals
method covers "all fields" not "pk fields" so causes duplicates. How do I create an atomically updateable collection with my own PK?