X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FShardReadWriteTransaction.java;h=515b448f7b1ebf7f3f4981487c14f980a8eb4268;hp=c90b2ae02855145282b3a6ea72deb92364c06927;hb=b124e8216055ee30a87207c8b8a95e5c9661f291;hpb=412db94945c5db5d2da918f5e23bd3abcecc4d10 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardReadWriteTransaction.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardReadWriteTransaction.java index c90b2ae028..515b448f7b 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardReadWriteTransaction.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardReadWriteTransaction.java @@ -1,11 +1,9 @@ /* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. * - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.controller.cluster.datastore; @@ -21,23 +19,16 @@ import org.opendaylight.controller.cluster.datastore.messages.ReadData; */ public class ShardReadWriteTransaction extends ShardWriteTransaction { public ShardReadWriteTransaction(ReadWriteShardDataTreeTransaction transaction, ActorRef shardActor, - ShardStats shardStats, String transactionID, short clientTxVersion) { - super(transaction, shardActor, shardStats, transactionID, clientTxVersion); + ShardStats shardStats, String transactionID) { + super(transaction, shardActor, shardStats, transactionID); } @Override public void handleReceive(Object message) throws Exception { - if (message instanceof ReadData) { - readData((ReadData) message, !SERIALIZED_REPLY); - - } else if (message instanceof DataExists) { - dataExists((DataExists) message, !SERIALIZED_REPLY); - - } else if(ReadData.SERIALIZABLE_CLASS.equals(message.getClass())) { - readData(ReadData.fromSerializable(message), SERIALIZED_REPLY); - - } else if(DataExists.SERIALIZABLE_CLASS.equals(message.getClass())) { - dataExists(DataExists.fromSerializable(message), SERIALIZED_REPLY); + if(ReadData.isSerializedType(message)) { + readData(ReadData.fromSerializable(message)); + } else if(DataExists.isSerializedType(message)) { + dataExists((DataExists) message); } else { super.handleReceive(message); }