/* * Copyright (c) 2015 Hewlett-Packard Enterprise. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.nic.engine.service; import com.google.common.util.concurrent.CheckedFuture; import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException; import org.opendaylight.nic.utils.EventType; import org.opendaylight.yang.gen.v1.urn.opendaylight.nic.intent.state.transaction.rev151203.intent.state.transactions.IntentStateTransaction; /** * Service to handle State Machine behaviors and events */ public interface EngineService { /** * Starts State Machine execution * @param eventType the {@link EventType} * @param transaction the {@link IntentStateTransaction} * @return {@link CheckedFuture} */ CheckedFuture<Void, TransactionCommitFailedException> execute(EventType eventType, IntentStateTransaction transaction); }