Package io.quarkus.arc.impl
Class ComputingCacheContextInstances
java.lang.Object
io.quarkus.arc.impl.ComputingCacheContextInstances
- All Implemented Interfaces:
ContextInstances
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputeIfAbsent(String id, Supplier<ContextInstanceHandle<?>> supplier) getIfPresent(String id) voidremoveEach(Consumer<? super ContextInstanceHandle<?>> action) Removes all instance handles and performs the given action (if present) for each handle.
-
Field Details
-
instances
-
-
Constructor Details
-
ComputingCacheContextInstances
public ComputingCacheContextInstances()
-
-
Method Details
-
computeIfAbsent
public ContextInstanceHandle<?> computeIfAbsent(String id, Supplier<ContextInstanceHandle<?>> supplier) - Specified by:
computeIfAbsentin interfaceContextInstances- Parameters:
id-supplier-- Returns:
- the instance handle
-
getIfPresent
- Specified by:
getIfPresentin interfaceContextInstances- Parameters:
id-- Returns:
- the instance handle if present,
nullotherwise
-
remove
- Specified by:
removein interfaceContextInstances- Parameters:
id-- Returns:
- the removed instance handle, or
null
-
getAllPresent
- Specified by:
getAllPresentin interfaceContextInstances- Returns:
- all instance handles
-
removeEach
Description copied from interface:ContextInstancesRemoves all instance handles and performs the given action (if present) for each handle.- Specified by:
removeEachin interfaceContextInstances- Parameters:
action-
-