Interface BiCreator<I,K,V,C>

All Superinterfaces:
Creator<I,Map.Entry<K,V>,C>

public interface BiCreator<I,K,V,C> extends Creator<I,Map.Entry<K,V>,C>
Creates a pair of entries in a cache.
Author:
Paul Ferraro
  • Method Details

    • createEntry

      Map.Entry<CompletionStage<K>,CompletionStage<V>> createEntry(I id, C context)
      Creates a value in the cache, if it does not already exist.
      Parameters:
      id - the cache entry identifier.
      Returns:
      the new value, or the existing value the cache entry already exists.
    • createValueAsync

      default CompletionStage<Map.Entry<K,V>> createValueAsync(I id, C context)
      Description copied from interface: Creator
      Creates a value in the cache, if it does not already exist.
      Specified by:
      createValueAsync in interface Creator<I,K,V>
      Parameters:
      id - the cache entry identifier.
      Returns:
      the new value, or the existing value the cache entry already exists.