*/
package org.opendaylight.openflowplugin.api.openflow.rpc;
-import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
+import org.opendaylight.openflowplugin.api.openflow.device.RequestContext;
+import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.RpcService;
+import org.opendaylight.yangtools.yang.common.RpcResult;
+import java.util.concurrent.Future;
/**
* This context is registered with MD-SAL as a routed RPC provider for the inventory node backed by this switch and
<S extends RpcService> void registerRpcServiceImplementation(Class<S> serviceClass, S serviceInstance);
- void setDeviceContext(DeviceContext deviceContext);
+ /*
+ * Method adds request to request queue which has limited quota. After number of requests exceeds quota limit
+ * {@link org.opendaylight.openflowplugin.api.openflow.device.exception.RequestQuotaExceededException} is thrown.
+ *
+ * @param data
+ */
+ <T extends DataObject> Future<RpcResult<T>> addNewRequest(DataObject data);
+ /**
+ * Method for setting request quota value. When the Request Context quota is exceeded, incoming RPCs fail
+ * immediately, with a well-defined error.
+ *
+ * @param maxRequestsPerDevice
+ */
+ void setRequestContextQuota(int maxRequestsPerDevice);
+
+ void forgetRequestContext(RequestContext requestContext);
}