Merge "BUG 2676 : Introduce API for accessing akka dispatchers"
[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 public interface DOMDataTreeShard extends EventListener {
20     /**
21      * Invoked whenever a child is getting attached as a more specific prefix under this shard.
22      *
23      * @param prefix Child's prefix
24      * @param child Child shard
25      */
26     void onChildAttached(@Nonnull DOMDataTreeIdentifier prefix, @Nonnull DOMDataTreeShard child);
27
28     /**
29      * Invoked whenever a child is getting detached as a more specific prefix under this shard.
30      *
31      * @param prefix Child's prefix
32      * @param child Child shard
33      */
34     void onChildDetached(@Nonnull DOMDataTreeIdentifier prefix, @Nonnull DOMDataTreeShard child);
35 }