CDS: Implement front-end support for local transactions
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / utils / ShardInfoListener.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.cluster.datastore.utils;
9
10 import javax.annotation.Nonnull;
11 import javax.annotation.Nullable;
12 import org.opendaylight.controller.cluster.datastore.messages.PrimaryShardInfo;
13
14 /**
15  * Listener interface used to register for primary shard information changes.
16  * Implementations of this interface can be registered with {@link ActorContext}
17  * to receive notifications about shard information changes.
18  */
19 public interface ShardInfoListener {
20     /**
21      * Update {@link PrimaryShardInfo} for a particular shard.
22      * @param shardName Shard name
23      * @param primaryShardInfo New {@link PrimaryShardInfo}, null if the information
24      *                         became unavailable.
25      */
26     void onShardInfoUpdated(@Nonnull String shardName, @Nullable PrimaryShardInfo primaryShardInfo);
27 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.