X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FShardReadWriteTransaction.java;h=90607dea0f3e97bcc6806cdcbdd4bac0ccd1caa2;hb=refs%2Fchanges%2F78%2F33178%2F3;hp=c90b2ae02855145282b3a6ea72deb92364c06927;hpb=9d382baa1e291f3199089b00f2e9adf910c1f9a0;p=controller.git 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..90607dea0f 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; @@ -27,17 +25,10 @@ public class ShardReadWriteTransaction extends ShardWriteTransaction { @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); }