Class Cache.ReplaceAdapter

java.lang.Object
org.apache.sis.util.collection.Cache.ReplaceAdapter
All Implemented Interfaces:
BiFunction<K,Object,Object>
Enclosing class:
Cache<K,V>

private final class Cache.ReplaceAdapter extends Object implements BiFunction<K,Object,Object>
A callback for Cache.map which forwards the calls to the remapping function provided by user. Before to forward the calls, ReplaceAdapter verifies if the value is under computation. If yes, then this adapter blocks until the value is available for forwarding it to the user.
  • Field Details

    • changes

      private Cache.Deferred<K,V> changes
      The new values for which to send notifications.
    • remapping

      private final BiFunction<? super K,? super V,? extends V> remapping
      The user-providing function.
  • Constructor Details

    • ReplaceAdapter

      ReplaceAdapter(BiFunction<? super K,? super V,? extends V> remapping)
      Creates a new adapter for the given user-provided function.
  • Method Details