From: Kal A. <ka...@te...> - 2002-02-28 20:43:39
|
At 21:02 28/02/2002 +0100, Florian G. Haas wrote: >Kal, > >here are a few comments. > >1. The fact that the methods returning an IndexMeta object are called >getIndexMeta() in IndexProvider and getIndexMetaData() in IndexManager seems >like an inconsistency to me. Agree - will rename to getIndexMeta() as this matches the class name. >2. Perhaps IndexManager.hasIndex(String) should be renamed to >isRegistered(String) or isRegisteredIndex(String). In addition, I think that >since already have IndexMeta.isAutomaticallyUpdated(), we should also have >an isAutomaticallyOpened() replacing requiresOpen() (with return values >reversed, of course). Good suggestions! >3. I think that IndexProvider.getIndexNames() should be renamed to >getIndexClassNames(), or perhaps be amended/replaced by a getIndexClasses() >method returning a Class[] array. A boolean isSupportedIndex(Class >indexClass) method may also be helpful. Or one might go the whole nine yards >and overload close(), getIndex(), getIndexMeta() and open() in such a way >that they also accept an argument of type Class, representing the index >class. The same could be done to the methods in IndexManager. I wanted to keep the IndexProvider interface as small and easy to implement as possible - it really only needs to expose methods for the IndexManager implementations to use. So I'll keep these suggestions in my back pocket for now...but I do think that overloading the IndexManager functions to accept Class parameters as well as String parameters makes sense. >4. Index.reindex() documents that it throws UnsupportedOperationException >which does not exist. it is java.lang.UnsupportedOperationException. >5. IndexProvider.getIndex() and IndexProvider.close() both document two >exceptions which they do not throw. Oops - my mistake - too eager to get the updates out :) They should both have a throws clause. >6. IndexManager.getIndex() documents one exception which it does not throw. Another "itchy commit finger" error ;-) >Hope I'm making sense, Definitely! Thanks for taking the time to review and comment. Cheers, Kal |