| | |
| | | private static boolean initializationCompleted = true; |
| | | |
| | | /** |
| | | * The configurable connection/handshake timeout. |
| | | */ |
| | | private static volatile int connectionTimeoutMS = 5000; |
| | | |
| | | /** |
| | | * Finds the domain for a given DN. |
| | | * |
| | | * @param dn The DN for which the domain must be returned. |
| | |
| | | configuration.addReplicationChangeListener(this); |
| | | |
| | | replayThreadNumber = configuration.getNumUpdateReplayThreads(); |
| | | connectionTimeoutMS = (int) Math.min(configuration.getConnectionTimeout(), |
| | | Integer.MAX_VALUE); |
| | | |
| | | // Create the list of domains that are already defined. |
| | | for (String name : configuration.listReplicationDomains()) |
| | |
| | | createReplayThreads(); |
| | | } |
| | | |
| | | connectionTimeoutMS = (int) Math.min(configuration.getConnectionTimeout(), |
| | | Integer.MAX_VALUE); |
| | | |
| | | return new ConfigChangeResult(ResultCode.SUCCESS, false); |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * Returns the connection timeout in milli-seconds. |
| | | * |
| | | * @return The connection timeout in milli-seconds. |
| | | */ |
| | | public static int getConnectionTimeoutMS() |
| | | { |
| | | return connectionTimeoutMS; |
| | | } |
| | | |
| | | } |