Class ActivatedJobImpl

java.lang.Object
io.camunda.zeebe.client.impl.response.ActivatedJobImpl
All Implemented Interfaces:
ActivatedJob

public final class ActivatedJobImpl extends Object implements ActivatedJob
  • Constructor Details

  • Method Details

    • getKey

      public long getKey()
      Specified by:
      getKey in interface ActivatedJob
      Returns:
      the unique key of the job
    • getType

      public String getType()
      Specified by:
      getType in interface ActivatedJob
      Returns:
      the type of the job
    • getProcessInstanceKey

      public long getProcessInstanceKey()
      Specified by:
      getProcessInstanceKey in interface ActivatedJob
      Returns:
      key of the process instance
    • getBpmnProcessId

      public String getBpmnProcessId()
      Specified by:
      getBpmnProcessId in interface ActivatedJob
      Returns:
      BPMN process id of the process
    • getProcessDefinitionVersion

      public int getProcessDefinitionVersion()
      Specified by:
      getProcessDefinitionVersion in interface ActivatedJob
      Returns:
      version of the process
    • getProcessDefinitionKey

      public long getProcessDefinitionKey()
      Specified by:
      getProcessDefinitionKey in interface ActivatedJob
      Returns:
      key of the process
    • getElementId

      public String getElementId()
      Specified by:
      getElementId in interface ActivatedJob
      Returns:
      id of the process element
    • getElementInstanceKey

      public long getElementInstanceKey()
      Specified by:
      getElementInstanceKey in interface ActivatedJob
      Returns:
      key of the element instance
    • getCustomHeaders

      public Map<String,String> getCustomHeaders()
      Specified by:
      getCustomHeaders in interface ActivatedJob
      Returns:
      user-defined headers associated with this job
    • getWorker

      public String getWorker()
      Specified by:
      getWorker in interface ActivatedJob
      Returns:
      the assigned worker to complete the job
    • getRetries

      public int getRetries()
      Specified by:
      getRetries in interface ActivatedJob
      Returns:
      remaining retries
    • getDeadline

      public long getDeadline()
      Specified by:
      getDeadline in interface ActivatedJob
      Returns:
      the unix timestamp until when the job is exclusively assigned to this worker (time unit * is milliseconds since unix epoch). If the deadline is exceeded, it can happen that the job is handed to another worker and the work is performed twice.
    • getVariables

      public String getVariables()
      Specified by:
      getVariables in interface ActivatedJob
      Returns:
      JSON-formatted variables
    • getVariablesAsMap

      public Map<String,Object> getVariablesAsMap()
      Specified by:
      getVariablesAsMap in interface ActivatedJob
      Returns:
      de-serialized variables as map
    • getVariablesAsType

      public <T> T getVariablesAsType(Class<T> variableType)
      Specified by:
      getVariablesAsType in interface ActivatedJob
      Returns:
      de-serialized variables as the given type
    • getVariable

      public Object getVariable(String name)
      Specified by:
      getVariable in interface ActivatedJob
      Returns:
      de-serialized variable value or null if the provided variable name is present among the available variables, otherwise throw a ClientException
    • toJson

      public String toJson()
      Specified by:
      toJson in interface ActivatedJob
      Returns:
      the record encoded as JSON
    • getTenantId

      public String getTenantId()
      Specified by:
      getTenantId in interface ActivatedJob
      Returns:
      the identifier of the tenant that owns the job
    • toString

      public String toString()
      Overrides:
      toString in class Object