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.controller.cluster.datastore.utils;
10 import javax.annotation.Nonnull;
11 import javax.annotation.Nullable;
12 import org.opendaylight.controller.cluster.datastore.messages.PrimaryShardInfo;
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.
19 public interface ShardInfoListener {
21 * Update {@link PrimaryShardInfo} for a particular shard.
22 * @param shardName Shard name
23 * @param primaryShardInfo New {@link PrimaryShardInfo}, null if the information
26 void onShardInfoUpdated(@Nonnull String shardName, @Nullable PrimaryShardInfo primaryShardInfo);