2 * Copyright (c) 2015 Cisco Systems, 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
9 package org.opendaylight.openflowplugin.api.openflow.device;
11 import com.google.common.util.concurrent.SettableFuture;
12 import org.opendaylight.openflowplugin.api.openflow.device.RequestContext;
13 import org.opendaylight.yangtools.yang.binding.DataObject;
14 import org.opendaylight.yangtools.yang.common.RpcResult;
17 * Created by Martin Bobak <mbobak@cisco.com> on 1.4.2015.
19 public interface RequestContextStack {
21 <T extends DataObject> void forgetRequestContext(RequestContext<T> requestContext);
24 * Method adds request to request queue which has limited quota. After number of requests exceeds quota limit future
25 * will be done immediately and will contain information about exceeded request quota.
29 <T extends DataObject> SettableFuture<RpcResult<T>> storeOrFail(RequestContext<T> data);
32 * Method returns new request context for current request.
36 <T extends DataObject> RequestContext<T> createRequestContext();