Interface Manager<K,V>

All Superinterfaces:
BiFunction<K,Function<Runnable,V>,V>

public interface Manager<K,V> extends BiFunction<K,Function<Runnable,V>,V>
Strategy for managing the creation and destruction of objects.
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(K key, Function<Runnable,V> factory)
    Returns the value associated with the specified key, creating it from the specified factory, if necessary.

    Methods inherited from interface java.util.function.BiFunction

    andThen
  • Method Details

    • apply

      V apply(K key, Function<Runnable,V> factory)
      Returns the value associated with the specified key, creating it from the specified factory, if necessary.
      Specified by:
      apply in interface BiFunction<K,Function<Runnable,V>,V>
      Parameters:
      key - the key of the managed value
      factory - a factory for creating the value from a close task
      Returns:
      a managed value