Community
Participate
Working Groups
The ISystemHostPool.getHostList() method exposes a list of connection objects, thus giving clients access to an internal structure that cannot easily be worked on in a thread-safe way. The method should be removed from the public API, since clients can call IHost[] ISystemHostPool.getHosts() instead which returns a copy of the internal list as an array and is thus thread-safe. The getHostList() method should be reserved for internal use in subclasses of the SystemHostPool implementation (and thus be made protected).
For a similar reason, ISystemHostPool.setName(String) should also be removed from the public API, because calling it could lead to inconsistencies. Host pools are never created by clients directly; therefore, clients can always call ISystemHostPool.renameHostPool(String) instead.
Created attachment 83434 [details] Patch removing the methods and updating Javadoc
Patch committed to ISystemHostPool v1.7 DaveD please review my JavaDoc changes for correctness. Please also look at bug 210537 to investigate the "throws" clauses in ISystemHostPool.
Especially please review if this is what we really want in orderHosts(): * Existing connections in the internal connection list that do not match any * alias name in the given name list, will be deleted from this host pool!
The changes to the javadoc look good. Regarding Bug 210537 - I think throwing "Exception" is weak engineering. If we throw anything it should be something RSEException or SystemException that either translates or wraps the reason - perhaps as an IStatus.