Improve segmented journal actor metrics
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / BatchedModificationsReply.java
1 /*
2  * Copyright (c) 2015 Brocade Communications 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.datastore.messages;
9
10 import java.io.IOException;
11 import java.io.ObjectInput;
12 import java.io.ObjectOutput;
13
14 /**
15  * The reply for the BatchedModifications message.
16  *
17  * @author Thomas Pantelis
18  */
19 @Deprecated(since = "9.0.0", forRemoval = true)
20 public final class BatchedModificationsReply extends VersionedExternalizableMessage {
21     @java.io.Serial
22     private static final long serialVersionUID = 1L;
23
24     private int numBatched;
25
26     public BatchedModificationsReply() {
27     }
28
29     public BatchedModificationsReply(final int numBatched) {
30         this.numBatched = numBatched;
31     }
32
33     public int getNumBatched() {
34         return numBatched;
35     }
36
37     @Override
38     public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
39         super.readExternal(in);
40         numBatched = in.readInt();
41     }
42
43     @Override
44     public void writeExternal(final ObjectOutput out) throws IOException {
45         super.writeExternal(out);
46         out.writeInt(numBatched);
47     }
48
49     @Override
50     public String toString() {
51         return "BatchedModificationsReply [numBatched=" + numBatched + "]";
52     }
53 }