I
- the type of intermediate value or Void
if no intermediate is required.public static interface SCMSourceRequest.IntermediateLambda<I>
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.
Modifier and Type | Method and Description |
---|---|
I |
create()
Creates an intermediate representation of the
SCMRevision that can be used by SCMSourceRequest.ProbeLambda
and SCMSourceRequest.LazyRevisionLambda to create the SCMSourceCriteria.Probe and SCMRevision
respectively. |
@Nullable I create() throws IOException, InterruptedException
SCMRevision
that can be used by SCMSourceRequest.ProbeLambda
and SCMSourceRequest.LazyRevisionLambda
to create the SCMSourceCriteria.Probe
and SCMRevision
respectively. This lambda is used where the creation of the SCMRevision
may involve a
more time costly operation that the creation of the SCMSourceCriteria.Probe
.null
if the implementer of SCMSourceRequest.ProbeLambda
and
SCMSourceRequest.LazyRevisionLambda
is expecting null
under defined conditions).IOException
- if there is an I/O error.InterruptedException
- if the operation was interrupted.Copyright © 2016–2022. All rights reserved.