, but they all extend DirectoryBasedIndexManager, no?
No
This all seems a bit vague to me tbh. Let's not add APIs because we could need them at some point but better when we actually know what we need and that we need it.
I do know that we need this, it's not vague. I pointed to real needs and existing open issues. not least to design details for Infinispan. Can also re-read the Index Affinity wiki if you want to learn more about that. Generally I think it's bad design that the invoker needs to know the implementation details; the engine shouldn't care if the backend is going to need this notification or if it's going to be a no-op, but more importantly we can't enumerate all implementations as these are SPIs and other people might need to plug in their own implementation. So working with instanceof and see if I should be casting to some kind of IndexManager to see if I should let it know that we're needing this index shared to relinquish resources is a big no-no from design point of view. On the other hand I don't see the benefit of avoiding this.. is it disturbing you so much that there's a no-op method? Please live with it, it's a sign of good design. And remember this is an SPI not a public API. |