public class ApiRequestsTracker extends Object implements ApiDeploymentListener
| Constructor and Description |
|---|
ApiRequestsTracker(ApiService apiService)
We use
ApiService in order to keep requests track only of the APIs currently deployed in the Mule Gateway. |
| Modifier and Type | Method and Description |
|---|---|
ApiRequestsTracker |
addRequest(long apiId)
Thread safe operation to add a new request to the API request counter.
|
RequestsPerApi |
getRequestsAndReset()
Returns a snapshot of the requests received and resets counters for next
GatewayStatus event. |
void |
onApiDeploymentStart(Api api) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitonApiDeploymentSuccess, onApiRedeploymentStart, onApiUndeploymentStartpublic ApiRequestsTracker(ApiService apiService)
ApiService in order to keep requests track only of the APIs currently deployed in the Mule Gateway.apiService - to be used to keep track of APIspublic void onApiDeploymentStart(Api api)
onApiDeploymentStart in interface ApiDeploymentListenerpublic ApiRequestsTracker addRequest(long apiId)
apiId - which received a request and need to add one to the counter.public RequestsPerApi getRequestsAndReset()
GatewayStatus event.RequestsPerApi containing the requests received at the moment of the method call.Copyright © 2014–2025 MuleSoft, Inc.. All rights reserved.