| | |
| | | |
| | | /** The info of the RS we are connected to. */ |
| | | private final ReplicationServerInfo rsInfo; |
| | | /** Contains a connected session to the RS if any exist, null otherwise. */ |
| | | private final Session session; |
| | | private final String replicationServer; |
| | | |
| | |
| | | final DN baseDN = getBaseDN(); |
| | | final ReplicationServerInfo rsInfo = rs.rsInfo; |
| | | |
| | | boolean connectSuccessful = false; |
| | | boolean connectCompleted = false; |
| | | try |
| | | { |
| | | maxSendWindow = rsInfo.getWindowSize(); |
| | |
| | | { |
| | | startChangeTimeHeartBeatPublishing(rs); |
| | | } |
| | | setConnectedRS(rs); |
| | | connectSuccessful = true; |
| | | connectCompleted = true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | } |
| | | finally |
| | | { |
| | | if (!connectSuccessful) |
| | | if (!connectCompleted) |
| | | { |
| | | setConnectedRS(ConnectedRS.noConnectedRS()); |
| | | } |
| | |
| | | |
| | | // Alright set the timeout to the desired value |
| | | session.setSoTimeout(timeout); |
| | | setConnectedRS(electedRS); |
| | | return topologyMsg; |
| | | } |
| | | catch (Exception e) |