ClusteredConnectionFactoryDelegate is the class responsible for LoadBallancing ConnectionFactories.
The only failover logic on it is the handleConnectionException which is just recreating the connection and calling ClientConnectionDelegate::failOver.
When we start to listen exceptions on other interceptors I might refactor this.
There is quite a lot of logic in there.
There is the load balancing policy - which is currently hardcoded to be round robin - needs to be separated out and made pluggable.
As I say, this should be in an aspect. If we don't do it now, it will probably never get done and the code will drift into an unmaintainable mess.