Interface ManagerFactory<K,V>

All Superinterfaces:
BiFunction<Consumer<V>,Consumer<V>,Manager<K,V>>

public interface ManagerFactory<K,V> extends BiFunction<Consumer<V>,Consumer<V>,Manager<K,V>>
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(Consumer<V> createTask, Consumer<V> closeTask)
    Creates a manager using the specified creation and close tasks.

    Methods inherited from interface java.util.function.BiFunction

    andThen
  • Method Details

    • apply

      Manager<K,V> apply(Consumer<V> createTask, Consumer<V> closeTask)
      Creates a manager using the specified creation and close tasks.
      Specified by:
      apply in interface BiFunction<Consumer<V>,Consumer<V>,Manager<K,V>>
      Parameters:
      createTask - a task to run on a newly created value
      closeTask - a task to run on a value to be closed/dereferenced.