fix memory leak on failover checking strategy.
add generated javadoc.
optimize.