Package hudson.scm

Class PollingResult

  • All Implemented Interfaces:
    Serializable, org.jenkinsci.remoting.SerializableOnlyOverRemoting

    public final class PollingResult
    extends Object
    implements org.jenkinsci.remoting.SerializableOnlyOverRemoting
    Immutable object that represents the result of SCM polling.

    This object is marked serializable just to be remoting friendly — Jenkins by itself doesn't persist this object.

    Since:
    1.345
    Author:
    Kohsuke Kawaguchi
    See Also:
    Serialized Form
    • Field Detail

      • baseline

        @CheckForNull
        public final SCMRevisionState baseline
        Baseline of the comparison. (This comes from either the workspace, or from the remote repository as of the last polling. Can be null.
      • remote

        @CheckForNull
        public final SCMRevisionState remote
        Current state of the remote repository. To be passed to the next invocation of the polling method. Can be null.
      • change

        @NonNull
        public final PollingResult.Change change
        Degree of the change between baseline and remote. Never null.

        The fact that this field is independent from baseline and remote are used to (1) allow the incomparable state which forces the immediate rebuild, and (2) allow SCM to ignore some changes in the repository to implement exclusion feature.

      • NO_CHANGES

        public static final PollingResult NO_CHANGES
        Constant to indicate no changes in the remote repository.
    • Method Detail

      • hasChanges

        public boolean hasChanges()