Merge "Re-added config.version to config-module-archetype."
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / modification / MergeModification.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.cluster.datastore.modification;
10
11 import org.opendaylight.controller.sal.core.spi.data.DOMStoreWriteTransaction;
12 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
13 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
14
15 /**
16  * MergeModification stores all the parameters required to merge data into the specified path
17  */
18 public class MergeModification extends AbstractModification{
19   private final NormalizedNode data;
20
21
22   public MergeModification(InstanceIdentifier path, NormalizedNode data) {
23     super(path);
24     this.data = data;
25   }
26
27   @Override
28   public void apply(DOMStoreWriteTransaction transaction) {
29     transaction.merge(path, data);
30   }
31 }