Interface SCMSourceRequest.IntermediateLambda<I>
- Type Parameters:
I- the type of intermediate value orVoidif no intermediate is required.
- Enclosing class:
- SCMSourceRequest
SCMSourceCriteria.Probe
and SCMRevision instances.
Some SCMRevision instances may be expensive to instantiate, for example a ChangeRequestSCMHead2
may need to get the effective merge revision in order to comply with the equality and "offline" requirement
of a SCMRevision which could require either asking the remote server or performing a local trial merge.
As this type of operation is only required if the SCMHead actually meets the SCMSourceCriteria
it may be preferred to delay instantiation of the SCMRevision and instead create the
SCMSourceCriteria.Probe from some intermediate. For example the SCMSourceCriteria may
only be checking the existence of files, if the file is present in both the ChangeRequestSCMHead2
and its ChangeRequestSCMHead.getTarget() then it will also be present in the merge revision and hence
the computation of the merge revision can be avoided completely.
-
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates an intermediate representation of theSCMRevisionthat can be used bySCMSourceRequest.ProbeLambdaandSCMSourceRequest.LazyRevisionLambdato create theSCMSourceCriteria.ProbeandSCMRevisionrespectively.
-
Method Details
-
create
Creates an intermediate representation of theSCMRevisionthat can be used bySCMSourceRequest.ProbeLambdaandSCMSourceRequest.LazyRevisionLambdato create theSCMSourceCriteria.ProbeandSCMRevisionrespectively. This lambda is used where the creation of theSCMRevisionmay involve a more time costly operation that the creation of theSCMSourceCriteria.Probe.- Returns:
- the intermediate (or
nullif the implementer ofSCMSourceRequest.ProbeLambdaandSCMSourceRequest.LazyRevisionLambdais expectingnullunder defined conditions). - Throws:
IOException- if there is an I/O error.InterruptedException- if the operation was interrupted.
-