| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.server.replication.server; |
| | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.replication.common.AssuredMode; |
| | | import org.opends.server.replication.common.CSN; |
| | | import org.opends.server.replication.protocol.AckMsg; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | /** |
| | | * This class holds every info needed about the expected acks for a received |
| | | * update message requesting assured replication with Safe Data sub-mode. |
| | |
| | | */ |
| | | public class SafeDataExpectedAcksInfo extends ExpectedAcksInfo |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** Requested level of safe data when the update message was received. */ |
| | | private byte safeDataLevel = -1; |
| | |
| | | if (ackingServer.isDataServer()) |
| | | { |
| | | // Sanity check: this should never happen |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("Received unexpected SD ack from DS id: " |
| | | if (logger.isTraceEnabled()) |
| | | logger.trace("Received unexpected SD ack from DS id: " |
| | | + ackingServer.getServerId() + " ack message: " + ackMsg); |
| | | return false; |
| | | } |
| | |
| | | if (ackReceived) |
| | | { |
| | | // Sanity check: this should never happen |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("Received unexpected ack from server id: " + |
| | | if (logger.isTraceEnabled()) |
| | | logger.trace("Received unexpected ack from server id: " + |
| | | ackingServerId + " ack message: " + ackMsg); |
| | | return false; |
| | | } else |