/* * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.controller.md.sal.dom.broker.impl.legacy.sharded.adapter; import static java.util.Objects.requireNonNull; import com.google.common.base.Optional; import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.MoreExecutors; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException; import org.opendaylight.controller.md.sal.dom.api.DOMDataReadOnlyTransaction; import org.opendaylight.mdsal.dom.api.DOMDataTreeReadTransaction; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; /** * Read transaction that delegates calls to {@link org.opendaylight.mdsal.dom.broker.ShardedDOMReadTransactionAdapter}, * which in turn translates calls to shard aware implementation of * {@link org.opendaylight.mdsal.dom.api.DOMDataTreeService}. * *
* Since reading data distributed on different subshards is not guaranteed to
* return all relevant data, we cannot guarantee it neither. Best effort is to
* return all data we get from first initial data change event received.
*/
@Deprecated(forRemoval = true)
class ShardedDOMDataBrokerDelegatingReadTransaction implements DOMDataReadOnlyTransaction {
private final DOMDataTreeReadTransaction delegateTx;
private final Object txIdentifier;
ShardedDOMDataBrokerDelegatingReadTransaction(final Object txIdentifier,
final DOMDataTreeReadTransaction delegateTx) {
this.delegateTx = requireNonNull(delegateTx);
this.txIdentifier = requireNonNull(txIdentifier);
}
@Override
public CheckedFuture