Class SCMSourceContext<C extends SCMSourceContext<C,​R>,​R extends SCMSourceRequest>

  • Type Parameters:
    C - the type of SCMSourceContext
    R - the type of SCMSourceRequest produced by this context.

    public abstract class SCMSourceContext<C extends SCMSourceContext<C,​R>,​R extends SCMSourceRequest>
    extends Object
    Represents the context within which a SCMSource is processing requests. In general this is used as a builder for SCMSourceRequest instances through newRequest(SCMSource, TaskListener) but there are some cases (such as SCMHeadEvent processing) where only the context is required and as such this type will be instantiated to obtain the context but no SCMSourceRequest will be created. Conventions:
    • The context is not designed to be shared by multiple threads.
    • All methods should be either final or abstract unless there is a documented reason for allowing overrides
    • All "setter" methods will return SCMSourceContext and be called "withXxx"
    • All "getter" methods will be called "xxx()". Callers should not assume that the returned value is resistant from concurrent changes. Implementations should ensure that the returned value is immutable by the caller. In other words, it is intentional for implementations to reduce intermediate allocations by return Collections.unmodifiableList(theList); rather than the concurrency safe return Collections.unmodifiableList(new ArrayList<>(theList));
    Since:
    2.2.0