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%2Fmodification%2FAbstractModification.java;h=2645a03538b71bc0c3d8952da5f07f48a49392a1;hb=0597bd64ca6214fd3ca3fb152ab2ca7fd3b32ed5;hp=f04d00440405deab7e5a8be141fd624fd3c30f35;hpb=608c2722054a167e2e6817fa2901876228f7685f;p=controller.git 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 f04d004404..2645a03538 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,28 +8,40 @@ package org.opendaylight.controller.cluster.datastore.modification; - 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 { + @java.io.Serial + private static final long serialVersionUID = 2647778426312509718L; private YangInstanceIdentifier path; + private short version; + + protected AbstractModification(final short version) { + this.version = version; + } - protected AbstractModification() { + protected AbstractModification(final short version, final YangInstanceIdentifier path) { + this.path = path; + this.version = version; } - protected AbstractModification(YangInstanceIdentifier path) { + protected AbstractModification(final YangInstanceIdentifier path) { this.path = path; } - protected void setPath(YangInstanceIdentifier path) { + protected void setPath(final YangInstanceIdentifier path) { this.path = path; } public YangInstanceIdentifier getPath() { return path; } + + public short getVersion() { + return version; + } }