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%2Fmodification%2FAbstractModification.java;h=33bd4d45e191419d605153463eafd2e00987830e;hp=5d9f96277ddcba65b05801ea328c8e80333744f3;hb=b12758e87e3da8b71b574614f8829e5fcbce11e8;hpb=03ee21b4d6ae3dd6fd3a6991253e877dc96fabf5 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModification.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModification.java index 5d9f96277d..33bd4d45e1 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModification.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModification.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2014, 2017 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, @@ -8,22 +8,38 @@ package org.opendaylight.controller.cluster.datastore.modification; - -import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; - -import java.io.Serializable; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; /** - * Base class to be used for all simple modifications that can be applied to a DOMStoreTransaction + * Base class to be used for all simple modifications that can be applied to a DOMStoreTransaction. */ -public abstract class AbstractModification implements Modification, - Serializable { +public abstract class AbstractModification implements Modification { - private static final long serialVersionUID = 1638042650152084457L; + private YangInstanceIdentifier path; + private short version; - protected final InstanceIdentifier path; + protected AbstractModification(final short version) { + this.version = version; + } - protected AbstractModification(InstanceIdentifier path) { + protected AbstractModification(final short version, final YangInstanceIdentifier path) { this.path = path; + this.version = version; + } + + protected AbstractModification(final YangInstanceIdentifier path) { + this.path = path; + } + + protected void setPath(final YangInstanceIdentifier path) { + this.path = path; + } + + public YangInstanceIdentifier getPath() { + return path; + } + + public short getVersion() { + return version; } }