Class InFlightLongPollingActivateJobsRequestsState
java.lang.Object
io.camunda.zeebe.gateway.impl.job.InFlightLongPollingActivateJobsRequestsState
-
Constructor Summary
ConstructorsConstructorDescriptionInFlightLongPollingActivateJobsRequestsState(String jobType, LongPollingMetrics metrics) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidintlongbooleanvoidincrementFailedAttempts(long lastUpdatedTime) voidvoidremoveRequest(InflightActivateJobsRequest request) voidvoidsetFailedAttempts(int failedAttempts) booleanshouldAttempt(int attemptThreshold) booleanReturns 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()
-