X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyang%2Fconfig%2Fdistributed_datastore_provider%2FForwardingDistributedDataStore.java;fp=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyang%2Fconfig%2Fdistributed_datastore_provider%2FForwardingDistributedDataStore.java;h=0000000000000000000000000000000000000000;hp=de74726d70113837990aae9a88510cf633088c38;hb=f41c5e6e6f6e10b36b1e4b1992877e38e718c8fb;hpb=2f05ce3fdd200dccd4a99ae16d1340c72d36ca11 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/ForwardingDistributedDataStore.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/ForwardingDistributedDataStore.java deleted file mode 100644 index de74726d70..0000000000 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/ForwardingDistributedDataStore.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2016 Brocade Communications 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.config.yang.config.distributed_datastore_provider; - -import com.google.common.collect.ForwardingObject; -import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface; -import org.opendaylight.controller.cluster.datastore.utils.ActorContext; -import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope; -import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeListener; -import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadTransaction; -import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction; -import org.opendaylight.controller.sal.core.spi.data.DOMStoreTransactionChain; -import org.opendaylight.controller.sal.core.spi.data.DOMStoreWriteTransaction; -import org.opendaylight.yangtools.concepts.ListenerRegistration; -import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; - -/** - * DOMStore implementation that forwards to a delegate. - * - * @author Thomas Pantelis - */ -class ForwardingDistributedDataStore extends ForwardingObject implements DistributedDataStoreInterface, AutoCloseable { - private final DistributedDataStoreInterface delegate; - private final AutoCloseable closeable; - - ForwardingDistributedDataStore(DistributedDataStoreInterface delegate, AutoCloseable closeable) { - this.delegate = delegate; - this.closeable = closeable; - } - - @Override - public DOMStoreReadTransaction newReadOnlyTransaction() { - return delegate().newReadOnlyTransaction(); - } - - @Override - public DOMStoreWriteTransaction newWriteOnlyTransaction() { - return delegate().newWriteOnlyTransaction(); - } - - @Override - public DOMStoreReadWriteTransaction newReadWriteTransaction() { - return delegate().newReadWriteTransaction(); - } - - @Override - public >> ListenerRegistration - registerChangeListener(YangInstanceIdentifier path, L listener, DataChangeScope scope) { - return delegate().registerChangeListener(path, listener, scope); - } - - @Override - public DOMStoreTransactionChain createTransactionChain() { - return delegate().createTransactionChain(); - } - - @Override - public ActorContext getActorContext() { - return delegate().getActorContext(); - } - - @Override - public void close() throws Exception { - closeable.close(); - } - - @Override - protected DistributedDataStoreInterface delegate() { - return delegate; - } -}