Improve segmented journal actor metrics
[controller.git] / opendaylight / md-sal / cds-access-api / src / main / java / org / opendaylight / controller / cluster / access / concepts / RequestSuccess.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.IOException;
11 import java.io.ObjectOutput;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.controller.cluster.access.ABIVersion;
14 import org.opendaylight.yangtools.concepts.WritableIdentifier;
15
16 /**
17  * A successful reply to a {@link Request}.
18  *
19  * @param <T> Target identifier type
20  */
21 public abstract class RequestSuccess<T extends WritableIdentifier, C extends RequestSuccess<T, C>>
22         extends Response<T, C> {
23     protected interface SerialForm<T extends WritableIdentifier, C extends RequestSuccess<T, C>>
24             extends Response.SerialForm<T, C> {
25         @Override
26         default void writeExternal(final ObjectOutput out, final C msg) throws IOException {
27             // Defaults to no-op
28         }
29     }
30
31     @java.io.Serial
32     private static final long serialVersionUID = 1L;
33
34     protected RequestSuccess(final @NonNull C success, final @NonNull ABIVersion version) {
35         super(success, version);
36     }
37
38     protected RequestSuccess(final @NonNull T target, final long sequence) {
39         super(target, sequence);
40     }
41 }