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=5e5a2a42cf49fadf1874fb65c79e88c1acfd1fa7;hp=c90b2ae02855145282b3a6ea72deb92364c06927;hb=987e2e706d0b343304142626bc870f3e8c909b51;hpb=3d460a8bcbc24eeb969319feb9c7bf16bff496c1 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..5e5a2a42cf 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; @@ -16,28 +14,22 @@ import org.opendaylight.controller.cluster.datastore.messages.DataExists; import org.opendaylight.controller.cluster.datastore.messages.ReadData; /** - * @author: syedbahm - * Date: 8/6/14 + * Actor for a shard read/write transaction. + * + * @author syedbahm */ 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) { + super(transaction, shardActor, shardStats); } @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); + public void handleReceive(Object message) { + if (ReadData.isSerializedType(message)) { + readData(ReadData.fromSerializable(message)); + } else if (DataExists.isSerializedType(message)) { + dataExists((DataExists) message); } else { super.handleReceive(message); }