219f2819dc4e89f5623444aab1a6460e3c90dd58
[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 com.google.common.annotations.Beta;
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  * @author Robert Varga
17  */
18 @Beta
19 public final class RetiredGenerationException extends RequestException {
20     private static final long serialVersionUID = 1L;
21
22     public RetiredGenerationException(final long newGeneration) {
23         super("Originating generation was superseded by " + Long.toUnsignedString(newGeneration));
24     }
25
26     @Override
27     public boolean isRetriable() {
28         return false;
29     }
30 }