2 * Copyright (c) 2018 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.openflowplugin.applications.frm;
10 import com.google.common.util.concurrent.ListenableFuture;
11 import java.util.concurrent.Callable;
13 public interface NodeConfigurator extends AutoCloseable {
15 * Enqueues a job in nodeconfigurator.
17 * @param key The job's key. Jobs with the same key are run sequentially.
18 * Jobs with different keys are run in parallel.
19 * @param mainWorker The task that runs for the job.
21 * @return the result of the enqueued job.
23 <T> ListenableFuture<T> enqueueJob(String key, Callable<ListenableFuture<T>> mainWorker);