All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.commons.util.concurrent.ParallelIterableMap Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
package org.infinispan.commons.util.concurrent;

/**
 * Map implementing this interface provide a mechanism for parallel key/value iteration.
 *
 *
 * @author Vladimir Blagojevic
 * @since 7.0
 */
public interface ParallelIterableMap{

   /**
    * Performs the given action for each (key, value) but traversing entries in parallel.
    *
    * @param parallelismThreshold the (estimated) number of elements
    * needed for this operation to be executed in parallel
    * @param action the action
    * @since 7.0
    */
   public void forEach(long parallelismThreshold, KeyValueAction action) throws InterruptedException;

   /**
    * Interface describing an action where input is map's key/value pair
    *
    */
   public interface KeyValueAction { void apply(A a, B b); }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy