Add Payload.serializedSize()
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / persisted / ServerConfigurationPayload.java
index eb668175d6e1e36f377cc103a5969b7b564b608c..68a5945b9f860652e7f5e27741f4e6700d95ddaf 100644 (file)
@@ -89,6 +89,11 @@ public final class ServerConfigurationPayload extends Payload implements Persist
 
     @Override
     public int size() {
+        return serializedSize();
+    }
+
+    @Override
+    public int serializedSize() {
         if (serializedSize < 0) {
             try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
                 try (ObjectOutputStream out = new ObjectOutputStream(bos)) {