| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | * Portions Copyright 2011-2016 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | */ |
| | | public static boolean isECLEnabledDomain(DN baseDN) |
| | | { |
| | | waitForStartup(); |
| | | // if state is STOPPING, then we need to return from this method |
| | | final LDAPReplicationDomain domain = domains.get(baseDN); |
| | | return domain != null && domain.isECLEnabled(); |
| | | } |
| | | |
| | | /** |
| | | * Returns whether the external change-log contains data from at least a domain. |
| | | * @return whether the external change-log contains data from at least a domain |
| | | */ |
| | | public static boolean isECLEnabled() |
| | | { |
| | | waitForStartup(); |
| | | for (LDAPReplicationDomain domain : domains.values()) |
| | | { |
| | | if (domain.isECLEnabled()) |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | private static void waitForStartup() |
| | | { |
| | | if (State.STARTING.equals(state.get())) |
| | | { |
| | | synchronized (state) |
| | |
| | | } |
| | | } |
| | | } |
| | | // if state is STOPPING, then we need to return from this method |
| | | final LDAPReplicationDomain domain = domains.get(baseDN); |
| | | return domain != null && domain.isECLEnabled(); |
| | | } |
| | | |
| | | /** |