Interface Creator<K,V,C>

All Known Subinterfaces:
BiCreator<I,K,V,C>

public interface Creator<K,V,C>
Creates an entry in a cache.
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    default V
    createValue(K id, C context)
    Creates a value in the cache, if it does not already exist.
    createValueAsync(K id, C context)
    Creates a value in the cache, if it does not already exist.
  • Method Details

    • createValue

      default V createValue(K 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

      CompletionStage<V> createValueAsync(K 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.