Merge "Removing { } from NormalizedNodeJsonBodyWriter"
[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 public class BatchedModificationsReply extends VersionedExternalizableMessage {
20     private static final long serialVersionUID = 1L;
21
22     private int numBatched;
23
24     public BatchedModificationsReply() {
25     }
26
27     public BatchedModificationsReply(int numBatched) {
28         this.numBatched = numBatched;
29     }
30
31
32     public int getNumBatched() {
33         return numBatched;
34     }
35
36     @Override
37     public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
38         super.readExternal(in);
39         numBatched = in.readInt();
40     }
41
42     @Override
43     public void writeExternal(ObjectOutput out) throws IOException {
44         super.writeExternal(out);
45         out.writeInt(numBatched);
46     }
47
48     @Override
49     public Object toSerializable() {
50         return this;
51     }
52 }