public interface

Job

com.atlassian.bitbucket.job.Job

Class Overview

Represents a job that runs for some period of time doing some specific set of tasks on a single node in the cluster.

Summary

Public Methods
@Nonnull Optional<Instant> getEndDate()
long getId()
@Nonnull Optional<ApplicationUser> getInitiator()
@Nonnull String getNodeId()
@Nonnull Progress getProgress()
@Nonnull Instant getStartDate()
@Nonnull JobState getState()
@Nonnull String getType()
@Nonnull Instant getUpdatedDate()
int getVersion()

Public Methods

@Nonnull public Optional<Instant> getEndDate ()

Returns
  • when the job was ended or empty if it has not started or is still running

public long getId ()

Returns
  • the job's ID

@Nonnull public Optional<ApplicationUser> getInitiator ()

Returns
  • the user who initiated the job or empty for system-initiated jobs

@Nonnull public String getNodeId ()

Returns
  • the node the job is currently running on

@Nonnull public Progress getProgress ()

Returns
  • the progress of the job

@Nonnull public Instant getStartDate ()

Returns
  • when the job was created and started

@Nonnull public JobState getState ()

Returns
  • the current state of the job

@Nonnull public String getType ()

Returns
  • a string representation of the type of this job. This is feature-specific and allows jobs to be categorised when querying to filter out jobs unrelated to the feature doing the query.

@Nonnull public Instant getUpdatedDate ()

Returns
  • when the job details were last updated

public int getVersion ()

Returns
  • the current version of the job