2 * Copyright (c) 2018 Pantheon Technologies, s.r.o. 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.mdsal.dom.api;
10 import com.google.common.annotations.Beta;
11 import com.google.common.util.concurrent.FluentFuture;
12 import org.eclipse.jdt.annotation.NonNullByDefault;
13 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
14 import org.opendaylight.yangtools.yang.data.api.schema.tree.StoreTreeNode;
15 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
18 * Interface implemented by an individual operation implementation. This API allows for dispatch implementations, e.g.
19 * an individual object handling a multitude of operations.
21 * @author Robert Varga
26 public interface DOMActionImplementation {
28 * Initiate invocation of the action. Implementations of this method are expected to not block.
30 * @param type SchemaPath of the action to be invoked. This path refers to an effective action instantiated on top
31 * of the conceptual {@link StoreTreeNode}.
32 * @param path {@link DOMDataTreeIdentifier} of parent data node which action attached to.
33 * @param input Input arguments
34 * @return A FluentFuture which completes with the result of invocation
35 * @throws NullPointerException if any of the arguments is null
37 FluentFuture<? extends DOMActionResult> invokeAction(SchemaPath type, DOMDataTreeIdentifier path,
41 * Return the relative invocation cost of this implementation. Default implementation returns 0.
43 * @return Non-negative cost of invoking this implementation.
45 default long invocationCost() {