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
8 package org.opendaylight.controller.cluster.databroker;
10 import com.google.common.base.Preconditions;
11 import org.opendaylight.controller.cluster.databroker.actors.dds.ClientTransaction;
12 import org.opendaylight.mdsal.dom.spi.store.DOMStoreTransaction;
15 * Abstract base class for concrete {@link DOMStoreTransaction} implementations. It holds a reference to the associated
16 * {@link ClientTransaction}. This abstraction layer is needed to isolate end users, who interact with
17 * {@link DOMStoreTransaction} from the internal implementation.
19 * @author Robert Varga
21 abstract class AbstractShardedTransaction implements DOMStoreTransaction {
22 private final ClientTransaction tx;
24 AbstractShardedTransaction(final ClientTransaction tx) {
25 this.tx = Preconditions.checkNotNull(tx);
29 public final Object getIdentifier() {
30 return tx.getIdentifier();
33 final ClientTransaction transaction() {