2 * Copyright (c) 2019 Ericsson India Global Services Pvt Ltd. 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.genius.cloudscaler.api;
10 import java.util.List;
11 import java.util.function.Function;
12 import org.opendaylight.mdsal.common.api.ReadFailedException;
13 import org.opendaylight.yangtools.yang.common.Uint64;
15 public interface TombstonedNodeManager {
18 * Tells if the supplied dpn is getting scaled in or not.
20 * @return true if the supllied dpn is getting scaled in
21 * @throws ReadFailedException throws read failed exception
23 boolean isDpnTombstoned(Uint64 dpnId) throws ReadFailedException;
26 * Add the listener callback which will be invoked upon recovery of scaled in dpn.
27 * @param callback callback to be invoked on recovery
29 void addOnRecoveryCallback(Function<Uint64, Void> callback);
32 * Filters the list of dpns which are not scaled in.
33 * @param dpns the input list of dpns
34 * @return filtered list of dpns which are not scaled in
35 * @throws ReadFailedException throws read failed exception
37 List<Uint64> filterTombStoned(List<Uint64> dpns) throws ReadFailedException;