2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.controller.cluster.sharding;
11 import org.opendaylight.controller.cluster.databroker.actors.dds.ClientTransaction;
12 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
13 import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteCursor;
14 import org.opendaylight.mdsal.dom.spi.store.DOMStoreThreePhaseCommitCohort;
17 * The context for a single shards modification, keeps a ClientTransaction so it can route requests correctly.
19 @Deprecated(forRemoval = true)
20 public class DistributedShardModificationContext {
22 private final ClientTransaction transaction;
23 private final DOMDataTreeIdentifier identifier;
24 private DOMDataTreeWriteCursor cursor;
26 public DistributedShardModificationContext(final ClientTransaction transaction,
27 final DOMDataTreeIdentifier identifier) {
28 this.transaction = transaction;
29 this.identifier = identifier;
32 public DOMDataTreeIdentifier getIdentifier() {
36 DOMDataTreeWriteCursor cursor() {
38 cursor = transaction.openCursor();
44 DOMStoreThreePhaseCommitCohort ready() {
50 return transaction.ready();