Revert "Leader should always apply modifications as local"
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / shardmanager / RegisterForShardAvailabilityChanges.java
1 /*
2  * Copyright (c) 2018 Red Hat, 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.shardmanager;
9
10 import static java.util.Objects.requireNonNull;
11
12 import java.util.function.Consumer;
13
14 /**
15  * Local ShardManager message to register a callback to be notified of shard availability changes. The reply to
16  * this message is a {@link org.opendaylight.yangtools.concepts.Registration} instance wrapped in a
17  * {@link akka.actor.Status.Success}.
18  *
19  * @author Thomas Pantelis
20  */
21 public class RegisterForShardAvailabilityChanges {
22     private final Consumer<String> callback;
23
24     public RegisterForShardAvailabilityChanges(Consumer<String> callback) {
25         this.callback = requireNonNull(callback);
26     }
27
28     public Consumer<String> getCallback() {
29         return callback;
30     }
31 }

©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.