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 com.google.common.annotations.Beta;
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 * @author Robert Varga
21 public final class OutOfSequenceEnvelopeException extends RequestException {
22 private static final long serialVersionUID = 1L;
24 public OutOfSequenceEnvelopeException(final long expectedEnvelope) {
25 super("Expecting envelope " + Long.toUnsignedString(expectedEnvelope));
29 public boolean isRetriable() {