2f7f9af49c27009376dceaf97445eb547125e0ad
[mdsal.git] / dom / mdsal-dom-api / src / main / java / org / opendaylight / mdsal / 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.mdsal.dom.api;
9
10 import java.util.EventListener;
11 import org.eclipse.jdt.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 This interface is scheduled for removal in the next major release.
20  */
21 @Deprecated(forRemoval = true)
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 }