Bug 1703: Added debug logging of ignored event to ease debuging.
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / java / org / opendaylight / controller / md / sal / binding / impl / BindingDataReadTransactionImpl.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.md.sal.binding.impl;
9
10 import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
11 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
12 import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
13 import org.opendaylight.controller.md.sal.dom.api.DOMDataReadOnlyTransaction;
14 import org.opendaylight.yangtools.yang.binding.DataObject;
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
16
17 import com.google.common.base.Optional;
18 import com.google.common.util.concurrent.CheckedFuture;
19
20 class BindingDataReadTransactionImpl extends AbstractForwardedTransaction<DOMDataReadOnlyTransaction> implements
21         ReadOnlyTransaction {
22
23     protected BindingDataReadTransactionImpl(final DOMDataReadOnlyTransaction delegate,
24             final BindingToNormalizedNodeCodec codec) {
25         super(delegate, codec);
26     }
27
28     @Override
29     public <T extends DataObject> CheckedFuture<Optional<T>,ReadFailedException> read(
30             final LogicalDatastoreType store, final InstanceIdentifier<T> path) {
31         return doRead(getDelegate(),store, path);
32     }
33
34     @Override
35     public void close() {
36         getDelegate().close();
37     }
38
39 }