Bump versions to 4.0.0-SNAPSHOT
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / sharding / DistributedShardModificationCursor.java
1 /*
2  * Copyright (c) 2016 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 package org.opendaylight.controller.cluster.sharding;
9
10 import org.opendaylight.mdsal.dom.spi.shard.AbstractDataModificationCursor;
11 import org.opendaylight.mdsal.dom.spi.shard.WriteCursorStrategy;
12
13 /**
14  * Internal cursor implementation consisting of WriteCursorStrategies which forwards writes to foreign modifications
15  * if any.
16  */
17 @Deprecated(forRemoval = true)
18 public class DistributedShardModificationCursor extends AbstractDataModificationCursor<DistributedShardModification> {
19
20     private final ShardProxyTransaction parent;
21
22     public DistributedShardModificationCursor(final DistributedShardModification root,
23                                               final ShardProxyTransaction parent) {
24         super(root);
25         this.parent = parent;
26     }
27
28     @Override
29     protected WriteCursorStrategy getRootOperation(final DistributedShardModification root) {
30         return root.createOperation(null);
31     }
32
33     @Override
34     public void close() {
35         parent.cursorClosed();
36     }
37 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.