Package hudson.scm
Class PollingResult
- java.lang.Object
-
- hudson.scm.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PollingResult.Change
Degree of changes between the previous state and this state.
-
Field Summary
Fields Modifier and Type Field Description SCMRevisionState
baseline
Baseline of the comparison.static PollingResult
BUILD_NOW
Constant that usesPollingResult.Change.INCOMPARABLE
which forces an immediate build.PollingResult.Change
change
Degree of the change between baseline and remote.static PollingResult
NO_CHANGES
Constant to indicate no changes in the remote repository.SCMRevisionState
remote
Current state of the remote repository.static PollingResult
SIGNIFICANT
-
Constructor Summary
Constructors Constructor Description PollingResult(PollingResult.Change change)
PollingResult(SCMRevisionState baseline, SCMRevisionState remote, PollingResult.Change change)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasChanges()
-
-
-
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
andremote
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.
-
SIGNIFICANT
public static final PollingResult SIGNIFICANT
-
BUILD_NOW
public static final PollingResult BUILD_NOW
Constant that usesPollingResult.Change.INCOMPARABLE
which forces an immediate build.
-
-
Constructor Detail
-
PollingResult
public PollingResult(@CheckForNull SCMRevisionState baseline, @CheckForNull SCMRevisionState remote, @NonNull PollingResult.Change change)
-
PollingResult
public PollingResult(@NonNull PollingResult.Change change)
-
-