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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Degree of changes between the previous state and this state. -
Field Summary
Modifier and TypeFieldDescriptionfinal SCMRevisionState
Baseline of the comparison.static final PollingResult
Constant that usesPollingResult.Change.INCOMPARABLE
which forces an immediate build.final PollingResult.Change
Degree of the change between baseline and remote.static final PollingResult
Constant to indicate no changes in the remote repository.final SCMRevisionState
Current state of the remote repository.static final PollingResult
-
Constructor Summary
ConstructorDescriptionPollingResult
(PollingResult.Change change) PollingResult
(SCMRevisionState baseline, SCMRevisionState remote, PollingResult.Change change) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jenkinsci.remoting.SerializableOnlyOverRemoting
getChannelForSerialization
-
Field Details
-
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
Current state of the remote repository. To be passed to the next invocation of the polling method. Can be null. -
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
Constant to indicate no changes in the remote repository. -
SIGNIFICANT
-
BUILD_NOW
Constant that usesPollingResult.Change.INCOMPARABLE
which forces an immediate build.
-
-
Constructor Details
-
PollingResult
public PollingResult(@CheckForNull SCMRevisionState baseline, @CheckForNull SCMRevisionState remote, @NonNull PollingResult.Change change) -
PollingResult
-
-
Method Details
-
hasChanges
public boolean hasChanges()
-