| | |
| | | import java.util.LinkedHashSet; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.NameNotFoundException; |
| | | import javax.naming.NamingEnumeration; |
| | |
| | | import org.opends.admin.ads.util.ConnectionUtils; |
| | | import org.opends.admin.ads.util.PreferredConnection; |
| | | import org.opends.admin.ads.util.ServerLoader; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.util.Utils; |
| | | |
| | | /** |
| | |
| | | new LinkedHashSet<PreferredConnection>(); |
| | | private final TopologyCacheFilter filter = new TopologyCacheFilter(); |
| | | private final static int MULTITHREAD_TIMEOUT = 90 * 1000; |
| | | private static final Logger LOG = |
| | | Logger.getLogger(TopologyCache.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Constructor of the TopologyCache. |
| | |
| | | ServerDescriptor descriptor = loader.getServerDescriptor(); |
| | | for (ReplicaDescriptor replica : descriptor.getReplicas()) |
| | | { |
| | | LOG.log(Level.INFO, "Handling replica with dn: " |
| | | + replica.getSuffix().getDN()); |
| | | logger.debug(LocalizableMessage.raw("Handling replica with dn: " |
| | | + replica.getSuffix().getDN())); |
| | | |
| | | boolean suffixFound = false; |
| | | LdapName dn = new LdapName(replica.getSuffix().getDN()); |
| | |
| | | } |
| | | catch (InterruptedException ie) |
| | | { |
| | | LOG.log(Level.INFO, ie + " caught and ignored", ie); |
| | | logger.debug(LocalizableMessage.raw(ie + " caught and ignored", ie)); |
| | | } |
| | | if (t.isAlive()) |
| | | { |
| | |
| | | } |
| | | Date endDate = new Date(); |
| | | long workingTime = endDate.getTime() - startDate.getTime(); |
| | | LOG.log(Level.INFO, "Loading ended at " + workingTime + " ms"); |
| | | logger.debug(LocalizableMessage.raw("Loading ended at " + workingTime + " ms")); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Unexpected error reading replica ID: " + t, |
| | | t); |
| | | logger.warn(LocalizableMessage.raw("Unexpected error reading replica ID: " + t, |
| | | t)); |
| | | } |
| | | |
| | | for (ReplicaDescriptor replica : candidateReplicas) |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Unexpected error reading age of oldest change: " + t, t); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Unexpected error reading age of oldest change: " + t, t)); |
| | | } |
| | | } |
| | | s = ConnectionUtils.getFirstValue(sr, "missing-changes"); |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Unexpected error reading missing changes: " + t, t); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Unexpected error reading missing changes: " + t, t)); |
| | | } |
| | | } |
| | | updatedReplicas.add(replica); |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Unexpected error closing enumeration on monitor entries" + t, t); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Unexpected error closing enumeration on monitor entries" + t, t)); |
| | | } |
| | | } |
| | | if (ctx != null) |