Improve segmented journal actor metrics
[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 /**
11  * General error raised when the recipient of a {@link Request} determines that the request contains
12  * a {@link ClientIdentifier} which corresponds to an outdated generation.
13  */
14 public final class RetiredGenerationException extends RequestException {
15     @java.io.Serial
16     private static final long serialVersionUID = 1L;
17
18     public RetiredGenerationException(final long originatingGeneration, final long newGeneration) {
19         super("Originating generation " + Long.toUnsignedString(originatingGeneration) + " was superseded by "
20             + Long.toUnsignedString(newGeneration));
21     }
22
23     @Override
24     public boolean isRetriable() {
25         return false;
26     }
27 }