X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-common-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fcommon%2Fapi%2Fdata%2FAsyncReadOnlyTransaction.java;fp=opendaylight%2Fmd-sal%2Fsal-common-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fcommon%2Fapi%2Fdata%2FAsyncReadOnlyTransaction.java;h=ecf94cdfb18bb32a55c79cdae14d089f45a7ddbb;hp=0000000000000000000000000000000000000000;hb=d7d5c4d3e7eaed528961081718c47a0960517ace;hpb=acbb38a7b4b935e278a38f55c50f3ac169c65681 diff --git a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncReadOnlyTransaction.java b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncReadOnlyTransaction.java new file mode 100644 index 0000000000..ecf94cdfb1 --- /dev/null +++ b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncReadOnlyTransaction.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2014 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.common.api.data; + +import org.opendaylight.yangtools.concepts.Path; + +/** + * Read-only transaction, which provides stable view of data + * and is {@link AutoCloseable} resource. + * + * @see AsyncReadTransaction + * +* @param

+ * Type of path (subtree identifier), which represents location in + * tree + * @param + * Type of data (payload), which represents data payload + */ +public interface AsyncReadOnlyTransaction

, D> extends AsyncReadTransaction, AutoCloseable { + + /** + * Closes transaction and releases all resources associated with it. + * + */ + @Override + public void close(); +}