Interface ManagerFactory<K,​V>

    • Method Detail

      • 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.