2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.mdsal.dom.api;
10 import java.util.EventListener;
11 import javax.annotation.Nonnull;
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}
19 public interface DOMDataTreeShard extends EventListener {
21 * Invoked whenever a child is getting attached as a more specific prefix under this shard.
23 * @param prefix Child's prefix
24 * @param child Child shard
26 void onChildAttached(@Nonnull DOMDataTreeIdentifier prefix, @Nonnull DOMDataTreeShard child);
29 * Invoked whenever a child is getting detached as a more specific prefix under this shard.
31 * @param prefix Child's prefix
32 * @param child Child shard
34 void onChildDetached(@Nonnull DOMDataTreeIdentifier prefix, @Nonnull DOMDataTreeShard child);