Class FetchAndLockHandlerImpl

java.lang.Object
org.camunda.bpm.engine.rest.impl.FetchAndLockHandlerImpl
All Implemented Interfaces:
Runnable, FetchAndLockHandler

public class FetchAndLockHandlerImpl extends Object implements Runnable, FetchAndLockHandler
Author:
Tassilo Weidner
  • Field Details

  • Constructor Details

    • FetchAndLockHandlerImpl

      public FetchAndLockHandlerImpl()
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
    • acquire

      protected void acquire()
    • removeDuplicates

      protected void removeDuplicates()
    • start

      public void start()
      Description copied from interface: FetchAndLockHandler
      Receives a notification that the engine rest web application initialization has been started
      Specified by:
      start in interface FetchAndLockHandler
    • shutdown

      public void shutdown()
      Description copied from interface: FetchAndLockHandler
      Receives a notification that the engine rest web application is about to be shut down
      Specified by:
      shutdown in interface FetchAndLockHandler
    • suspend

      protected void suspend(long millis)
    • suspendAcquisition

      protected void suspendAcquisition(long millis)
    • addRequest

      protected void addRequest(FetchAndLockRequest request)
    • tryFetchAndLock

      protected FetchAndLockResult tryFetchAndLock(FetchAndLockRequest request)
    • executeFetchAndLock

      protected List<LockedExternalTaskDto> executeFetchAndLock(FetchExternalTasksExtendedDto fetchingDto, ProcessEngine processEngine)
    • errorTooManyRequests

      protected void errorTooManyRequests(jakarta.ws.rs.container.AsyncResponse asyncResponse)
    • rejectPendingRequests

      protected void rejectPendingRequests()
    • getProcessEngine

      protected ProcessEngine getProcessEngine(FetchAndLockRequest request)
    • isExpired

      protected boolean isExpired(FetchAndLockRequest request)
    • addPendingRequest

      public void addPendingRequest(FetchExternalTasksExtendedDto dto, jakarta.ws.rs.container.AsyncResponse asyncResponse, ProcessEngine processEngine)
      Description copied from interface: FetchAndLockHandler
      Invoked if a fetch and lock request has been sent by the client
      Specified by:
      addPendingRequest in interface FetchAndLockHandler
      Parameters:
      dto - which is supposed to hold the payload
      asyncResponse - provides means for asynchronous server side response processing
      processEngine - provides the process engine context of the respective request
    • contextInitialized

      public void contextInitialized(jakarta.servlet.ServletContextEvent servletContextEvent)
      Description copied from interface: FetchAndLockHandler
      Invoked on initialization of the servlet context
      Specified by:
      contextInitialized in interface FetchAndLockHandler
      Parameters:
      servletContextEvent - provides the servlet context
    • parseUniqueWorkerRequestParam

      protected void parseUniqueWorkerRequestParam(String uniqueWorkerRequestParam)
    • getPendingRequests

      public List<FetchAndLockRequest> getPendingRequests()