Interface Job

All Superinterfaces:
AdminCommandState, Serializable

public interface Job extends AdminCommandState, Serializable
Represents command instance.
Author:
Martin Mares, Bhakti Mehta
  • Method Details

    • setState

      void setState(AdminCommandState.State state)
      Sets the state.
      Parameters:
      state - must not be null
    • getCommandProgress

      CommandProgress getCommandProgress()
      Command progress only if it is supported by command
    • setCommandProgress

      void setCommandProgress(CommandProgress commandProgress)
    • complete

      void complete(ActionReport report, Payload.Outbound outbound)
      Complete job with the given report and payload.
      Parameters:
      report -
      outbound -
    • revert

      void revert()
      Change state to reverting. Command Can use it to send info about reverting to Job management infrastructure.
    • getEventBroker

      AdminCommandEventBroker getEventBroker()
    • getSubjectUsernames

      List<String> getSubjectUsernames()
    • getCommandExecutionDate

      long getCommandExecutionDate()
    • getPayload

      Payload.Outbound getPayload()
    • getJobsFile

      File getJobsFile()
    • setJobsFile

      void setJobsFile(File jobsFile)
    • getScope

      String getScope()
    • getCommandCompletionDate

      long getCommandCompletionDate()
    • setFailToRetryable

      void setFailToRetryable(boolean value)
      Job will be considered as retryable after fail. It means that checkpoint will not be deleted and revert or continue can be decided by the user.
    • getParameters

      ParameterMap getParameters()