-
Method Summary
Returns a mapped writer, whose mapping function is invoked while holding a lock.
Returns a supplier whose
Supplier.get() will update the reference only when the specified condition (invoked while holding a lock) is met.
Methods inherited from interface java.util.function.Supplier
get
-
Method Details
-
map
Returns a mapped writer, whose mapping function is invoked while holding a lock.
- Type Parameters:
R - the type of the mapped writer
- Parameters:
mapper - a mapping function
- Returns:
- a mapped writer
-
when
Returns a supplier whose
Supplier.get() will update the reference only when the specified condition (invoked while holding a lock) is met.
- Parameters:
condition - a condition for which this reference should be updated
- Returns:
- a supplier for updating this reference.