Class CachingSupplier<REQ,REP>
java.lang.Object
org.apache.maven.impl.cache.CachingSupplier<REQ,REP>
- Type Parameters:
REQ- The request typeREP- The response type
- All Implemented Interfaces:
Function<REQ,REP>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSpecial holder class for exceptions that occur during supplier execution. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
supplier
-
value
-
-
Constructor Details
-
CachingSupplier
-
-
Method Details
-
getValue
-
complete
Directly sets the cached value without invoking the supplier, then notifies any threads blocked inapply(Object)waiting for the result.This is used by
AbstractRequestCache.requests(List, Function)to set batch-resolved results on CachingSupplier instances. Concurrent callers blocked inapply()will be woken up and see this value instead of invoking the supplier redundantly.- Parameters:
result- the result to cache (may be a normal result or anCachingSupplier.AltResfor errors)
-
apply
-