Interface SCMSourceRequest.IntermediateLambda<I>
-
- Type Parameters:
I
- the type of intermediate value orVoid
if no intermediate is required.
- Enclosing class:
- SCMSourceRequest
public static interface SCMSourceRequest.IntermediateLambda<I>
A lambda that produces an intermediate summary used to drive creation of theSCMSourceCriteria.Probe
andSCMRevision
instances.Some
SCMRevision
instances may be expensive to instantiate, for example aChangeRequestSCMHead2
may need to get the effective merge revision in order to comply with the equality and "offline" requirement of aSCMRevision
which could require either asking the remote server or performing a local trial merge. As this type of operation is only required if theSCMHead
actually meets theSCMSourceCriteria
it may be preferred to delay instantiation of theSCMRevision
and instead create theSCMSourceCriteria.Probe
from some intermediate. For example theSCMSourceCriteria
may only be checking the existence of files, if the file is present in both theChangeRequestSCMHead2
and itsChangeRequestSCMHead.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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description I
create()
Creates an intermediate representation of theSCMRevision
that can be used bySCMSourceRequest.ProbeLambda
andSCMSourceRequest.LazyRevisionLambda
to create theSCMSourceCriteria.Probe
andSCMRevision
respectively.
-
-
-
Method Detail
-
create
@Nullable I create() throws IOException, InterruptedException
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.
-
-