Interface SCMSourceRequest.IntermediateLambda<I>
- Type Parameters:
I
- the type of intermediate value orVoid
if 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 theSCMRevision
that can be used bySCMSourceRequest.ProbeLambda
andSCMSourceRequest.LazyRevisionLambda
to create theSCMSourceCriteria.Probe
andSCMRevision
respectively.
-
Method Details
-
create
Creates an intermediate representation of theSCMRevision
that can be used bySCMSourceRequest.ProbeLambda
andSCMSourceRequest.LazyRevisionLambda
to create theSCMSourceCriteria.Probe
andSCMRevision
respectively. This lambda is used where the creation of theSCMRevision
may involve a more time costly operation that the creation of theSCMSourceCriteria.Probe
.- Returns:
- the intermediate (or
null
if the implementer ofSCMSourceRequest.ProbeLambda
andSCMSourceRequest.LazyRevisionLambda
is expectingnull
under defined conditions). - Throws:
IOException
- if there is an I/O error.InterruptedException
- if the operation was interrupted.
-