Promote cds-access-api
[controller.git] / opendaylight / md-sal / cds-access-api / src / main / java / org / opendaylight / controller / cluster / access / concepts / RetiredGenerationException.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.cluster.access.concepts;
9
10 import java.io.Serial;
11
12 /**
13  * General error raised when the recipient of a {@link Request} determines that the request contains
14  * a {@link ClientIdentifier} which corresponds to an outdated generation.
15  */
16 public final class RetiredGenerationException extends RequestException {
17     @Serial
18     private static final long serialVersionUID = 1L;
19
20     public RetiredGenerationException(final long originatingGeneration, final long newGeneration) {
21         super("Originating generation " + Long.toUnsignedString(originatingGeneration) + " was superseded by "
22             + Long.toUnsignedString(newGeneration));
23     }
24
25     @Override
26     public boolean isRetriable() {
27         return false;
28     }
29 }