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.util.concurrent.FluentFuture;
11 import java.util.Optional;
12 import org.eclipse.jdt.annotation.Nullable;
13 import org.opendaylight.controller.cluster.databroker.actors.dds.ClientTransaction;
14 import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadWriteTransaction;
15 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
16 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
19 * An implementation of {@link DOMStoreReadWriteTransaction} backed by a {@link ClientTransaction}.
21 * @author Robert Varga
23 final class ClientBackedReadWriteTransaction extends ClientBackedWriteTransaction
24 implements DOMStoreReadWriteTransaction {
26 ClientBackedReadWriteTransaction(final ClientTransaction delegate, final @Nullable Throwable allocationContext) {
27 super(delegate, allocationContext);
31 public FluentFuture<Optional<NormalizedNode>> read(final YangInstanceIdentifier path) {
32 return delegate().read(path);
36 public FluentFuture<Boolean> exists(final YangInstanceIdentifier path) {
37 return delegate().exists(path);