2 * Copyright (c) 2017 Pantheon Technologies, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.cluster.access.commands;
10 import java.io.Serial;
11 import org.opendaylight.controller.cluster.access.concepts.RequestException;
14 * A {@link RequestException} indicating that the backend has received a RequestEnvelope whose sequence does not match
15 * the next expected sequence. This can happen during leader transitions, when a part of the stream is rejected because
16 * the backend is not the leader and it transitions to being a leader with old stream messages still being present.
18 public final class OutOfSequenceEnvelopeException extends RequestException {
20 private static final long serialVersionUID = 1L;
22 public OutOfSequenceEnvelopeException(final long expectedEnvelope) {
23 super("Expecting envelope " + Long.toUnsignedString(expectedEnvelope));
27 public boolean isRetriable() {