Bug 9034: TracingBroker with TracingReadOnlyTransaction
[controller.git] / opendaylight / md-sal / mdsal-trace / dom-impl / src / main / java / org / opendaylight / controller / md / sal / trace / dom / impl / TracingReadOnlyTransaction.java
1 /*
2  * Copyright (c) 2017 Red Hat, 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.trace.dom.impl;
9
10 import com.google.common.base.Optional;
11 import com.google.common.util.concurrent.CheckedFuture;
12 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
13 import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
14 import org.opendaylight.controller.md.sal.dom.api.DOMDataReadOnlyTransaction;
15 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
16 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
17
18 class TracingReadOnlyTransaction implements DOMDataReadOnlyTransaction {
19
20     private final DOMDataReadOnlyTransaction delegate;
21     private final TracingBroker tracingBroker;
22
23     TracingReadOnlyTransaction(DOMDataReadOnlyTransaction delegate, TracingBroker tracingBroker) {
24         this.delegate = delegate;
25         this.tracingBroker = tracingBroker;
26     }
27
28     @Override
29     public CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> read(LogicalDatastoreType store,
30             YangInstanceIdentifier path) {
31         return delegate.read(store, path);
32     }
33
34     @Override
35     public CheckedFuture<Boolean, ReadFailedException> exists(LogicalDatastoreType store, YangInstanceIdentifier path) {
36         return delegate.exists(store, path);
37     }
38
39     @Override
40     public Object getIdentifier() {
41         return delegate.getIdentifier();
42     }
43
44     @Override
45     public void close() {
46         delegate.close();
47     }
48
49 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.