23ca275ef20ef24a710b39d5f06ff96fa9ca00ce
[controller.git] / opendaylight / md-sal / sal-common-api / src / main / java / org / opendaylight / controller / md / sal / common / api / data / AsyncTransaction.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.common.api.data;
9
10 import org.opendaylight.yangtools.concepts.Identifiable;
11 import org.opendaylight.yangtools.concepts.Path;
12
13
14 /**
15  *
16  * @author
17  *
18  * @param <P> Type of path (subtree identifier), which represents location in tree
19  * @param <D> Type of data (payload), which represents data payload
20  */
21 public interface AsyncTransaction<P extends Path<P>,D> extends //
22     Identifiable<Object>,
23     AutoCloseable {
24
25     @Override
26     public Object getIdentifier();
27
28     /**
29      * Closes transaction and releases all resources associated with it.
30      */
31     @Override
32     public void close();
33 }