Class InFlightLongPollingActivateJobsRequestsState<T>
java.lang.Object
io.camunda.zeebe.gateway.impl.job.InFlightLongPollingActivateJobsRequestsState<T>
-
Constructor Summary
ConstructorsConstructorDescriptionInFlightLongPollingActivateJobsRequestsState(String jobType, LongPollingMetrics metrics) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddActiveRequest(InflightActivateJobsRequest<T> request) voidvoidenqueueRequest(InflightActivateJobsRequest<T> request) intlongbooleanvoidincrementFailedAttempts(long lastUpdatedTime) voidremoveActiveRequest(InflightActivateJobsRequest<T> request) voidremoveRequest(InflightActivateJobsRequest<T> request) voidvoidsetFailedAttempts(int failedAttempts) booleanshouldAttempt(int attemptThreshold) booleanshouldBeRepeated(InflightActivateJobsRequest<T> request) Returns whether the request should be repeated.boolean
-
Constructor Details
-
InFlightLongPollingActivateJobsRequestsState
-
-
Method Details
-
incrementFailedAttempts
public void incrementFailedAttempts(long lastUpdatedTime) -
shouldAttempt
public boolean shouldAttempt(int attemptThreshold) -
resetFailedAttempts
public void resetFailedAttempts() -
getFailedAttempts
public int getFailedAttempts() -
setFailedAttempts
public void setFailedAttempts(int failedAttempts) -
getLastUpdatedTime
public long getLastUpdatedTime() -
enqueueRequest
-
getPendingRequests
-
removeRequest
-
getNextPendingRequest
-
addActiveRequest
-
removeActiveRequest
-
hasActiveRequests
public boolean hasActiveRequests() -
shouldBeRepeated
Returns whether the request should be repeated. A request should be repeated if the failed attempts were reset to 0 (because new jobs became available) whilst the request was running, and if the request's long polling is enabled. -
shouldNotifyAndStartNotification
public boolean shouldNotifyAndStartNotification() -
completeNotification
public void completeNotification()
-