2 * Copyright (c) 2018 Red Hat, 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.shardmanager;
10 import static java.util.Objects.requireNonNull;
12 import java.util.function.Consumer;
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}.
19 * @author Thomas Pantelis
21 public class RegisterForShardAvailabilityChanges {
22 private final Consumer<String> callback;
24 public RegisterForShardAvailabilityChanges(Consumer<String> callback) {
25 this.callback = requireNonNull(callback);
28 public Consumer<String> getCallback() {