1aae65aca5494e24316bf6c743d6eea3b17682fa
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / md / sal / dom / api / DOMDataTreeShard.java
1 /*
2  * Copyright (c) 2015 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.dom.api;
9
10 import java.util.EventListener;
11 import javax.annotation.Nonnull;
12
13 /**
14  * A single shard of the conceptual data tree. This interface defines the basic notifications
15  * a shard can receive. Each shard implementation is expected to also implement some of the
16  * datastore-level APIs. Which interfaces are required depends on the {@link DOMDataTreeShardingService}
17  * implementation.
18  *
19  * @deprecated Use {@link org.opendaylight.mdsal.dom.api.DOMDataTreeShard} instead.
20  */
21 @Deprecated
22 public interface DOMDataTreeShard extends EventListener {
23     /**
24      * Invoked whenever a child is getting attached as a more specific prefix under this shard.
25      *
26      * @param prefix Child's prefix
27      * @param child Child shard
28      */
29     void onChildAttached(@Nonnull DOMDataTreeIdentifier prefix, @Nonnull DOMDataTreeShard child);
30
31     /**
32      * Invoked whenever a child is getting detached as a more specific prefix under this shard.
33      *
34      * @param prefix Child's prefix
35      * @param child Child shard
36      */
37     void onChildDetached(@Nonnull DOMDataTreeIdentifier prefix, @Nonnull DOMDataTreeShard child);
38 }