| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | |
| | | private boolean isRegistered = false; |
| | | |
| | | private static boolean initializationCompleted = true; |
| | | |
| | | /** |
| | | * The configurable connection/handshake timeout. |
| | | */ |
| | |
| | | ReplicationSynchronizationProviderCfg configuration) |
| | | throws ConfigException |
| | | { |
| | | initializationCompleted = false; |
| | | domains.clear(); |
| | | replicationServerListener = new ReplicationServerListener(configuration); |
| | | |
| | |
| | | |
| | | DirectoryServer.registerSupportedControl( |
| | | ReplicationRepairRequestControl.OID_REPLICATION_REPAIR_CONTROL); |
| | | |
| | | initializationCompleted = true; |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * Checks if a given serverID is used by a local Replication Domain. |
| | | * |
| | | * @param serverId The serverID that should be checked. |
| | | * @return true if the serverID is local, false otherwise. |
| | | */ |
| | | public static boolean isLocalServerId(Integer serverId) |
| | | { |
| | | if (!initializationCompleted) |
| | | return true; |
| | | |
| | | for (LDAPReplicationDomain domain : domains.values()) |
| | | { |
| | | if (domain.getServerId() == serverId) |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * Returns the connection timeout in milli-seconds. |
| | | * |
| | | * @return The connection timeout in milli-seconds. |