Do not allow overrides of onReceive{Command,Recover}
[controller.git] / opendaylight / md-sal / sal-akka-raft-example / src / main / java / org / opendaylight / controller / cluster / example / messages / KeyValue.java
index 2eb4189eac911d7ecb773137bfcfc652b523564b..8916d9f9e3de2ac5dfad404a71509361c7ad4a74 100644 (file)
@@ -8,13 +8,8 @@
 
 package org.opendaylight.controller.cluster.example.messages;
 
-import com.google.protobuf.GeneratedMessage;
 import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
 import org.opendaylight.controller.cluster.raft.protobuff.client.messages.Payload;
-import org.opendaylight.controller.protobuff.messages.cluster.example.KeyValueMessages;
-import org.opendaylight.controller.protobuff.messages.cluster.raft.AppendEntriesMessages;
 
 public class KeyValue extends Payload implements Serializable {
     private static final long serialVersionUID = 1L;
@@ -52,24 +47,6 @@ public class KeyValue extends Payload implements Serializable {
             '}';
     }
 
-    // override this method to return  the protobuff related extension fields and their values
-    @Override public Map<GeneratedMessage.GeneratedExtension<?, ?>, String> encode() {
-        Map<GeneratedMessage.GeneratedExtension<?, ?>, String> map = new HashMap<>();
-        map.put(KeyValueMessages.key, getKey());
-        map.put(KeyValueMessages.value, getValue());
-        return map;
-    }
-
-    // override this method to assign the values from protobuff
-    @Override public Payload decode(
-        AppendEntriesMessages.AppendEntries.ReplicatedLogEntry.Payload payloadProtoBuff) {
-        String key = payloadProtoBuff.getExtension(KeyValueMessages.key);
-        String value = payloadProtoBuff.getExtension(KeyValueMessages.value);
-        this.setKey(key);
-        this.setValue(value);
-        return this;
-    }
-
     @Override
     public int size() {
         return this.value.length() + this.key.length();