Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.util.concurrent.jdk8backported
Class ConcurrentHashMapV8.ForkJoinTasks

java.lang.Object
  extended by org.infinispan.util.concurrent.jdk8backported.ConcurrentHashMapV8.ForkJoinTasks
Enclosing class:
ConcurrentHashMapV8<K,V>

public static class ConcurrentHashMapV8.ForkJoinTasks
extends Object

Predefined tasks for performing bulk parallel operations on ConcurrentHashMaps. These tasks follow the forms and rules used in class ConcurrentHashMapV8.Parallel. Each method has the same name, but returns a task rather than invoking it. These methods may be useful in custom applications such as submitting a task without waiting for completion, or combining with other tasks.


Method Summary
static
<K,V> ForkJoinTask<Void>
forEach(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.BiAction<K,V> action)
          Returns a task that when invoked, performs the given action for each (key, value)
static
<K,V,U> ForkJoinTask<Void>
forEach(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.BiFun<? super K,? super V,? extends U> transformer, ConcurrentHashMapV8.Action<U> action)
          Returns a task that when invoked, performs the given action for each non-null transformation of each (key, value)
static
<K,V> ForkJoinTask<Void>
forEachEntry(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.Action<Map.Entry<K,V>> action)
          Returns a task that when invoked, perform the given action for each entry.
static
<K,V,U> ForkJoinTask<Void>
forEachEntry(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.Fun<Map.Entry<K,V>,? extends U> transformer, ConcurrentHashMapV8.Action<U> action)
          Returns a task that when invoked, perform the given action for each non-null transformation of each entry.
static
<K,V> ForkJoinTask<Void>
forEachKey(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.Action<K> action)
          Returns a task that when invoked, performs the given action for each key.
static
<K,V,U> ForkJoinTask<Void>
forEachKey(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.Fun<? super K,? extends U> transformer, ConcurrentHashMapV8.Action<U> action)
          Returns a task that when invoked, performs the given action for each non-null transformation of each key.
static
<K,V> ForkJoinTask<Void>
forEachValue(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.Action<V> action)
          Returns a task that when invoked, performs the given action for each value.
static
<K,V,U> ForkJoinTask<Void>
forEachValue(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.Fun<? super V,? extends U> transformer, ConcurrentHashMapV8.Action<U> action)
          Returns a task that when invoked, performs the given action for each non-null transformation of each value.
static
<K,V,U> ForkJoinTask<U>
reduce(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.BiFun<? super K,? super V,? extends U> transformer, ConcurrentHashMapV8.BiFun<? super U,? super U,? extends U> reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all (key, value) pairs using the given reducer to combine values, or null if none.
static
<K,V> ForkJoinTask<Map.Entry<K,V>>
reduceEntries(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.BiFun<Map.Entry<K,V>,Map.Entry<K,V>,? extends Map.Entry<K,V>> reducer)
          Returns a task that when invoked, returns the result of accumulating all entries using the given reducer to combine values, or null if none.
static
<K,V,U> ForkJoinTask<U>
reduceEntries(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.Fun<Map.Entry<K,V>,? extends U> transformer, ConcurrentHashMapV8.BiFun<? super U,? super U,? extends U> reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all entries using the given reducer to combine values, or null if none.
static
<K,V> ForkJoinTask<Double>
reduceEntriesToDouble(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.ObjectToDouble<Map.Entry<K,V>> transformer, double basis, ConcurrentHashMapV8.DoubleByDoubleToDouble reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all entries using the given reducer to combine values, and the given basis as an identity value.
static
<K,V> ForkJoinTask<Integer>
reduceEntriesToInt(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.ObjectToInt<Map.Entry<K,V>> transformer, int basis, ConcurrentHashMapV8.IntByIntToInt reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all entries using the given reducer to combine values, and the given basis as an identity value.
static
<K,V> ForkJoinTask<Long>
reduceEntriesToLong(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.ObjectToLong<Map.Entry<K,V>> transformer, long basis, ConcurrentHashMapV8.LongByLongToLong reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all entries using the given reducer to combine values, and the given basis as an identity value.
static
<K,V> ForkJoinTask<K>
reduceKeys(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.BiFun<? super K,? super K,? extends K> reducer)
          Returns a task that when invoked, returns the result of accumulating all keys using the given reducer to combine values, or null if none.
static
<K,V,U> ForkJoinTask<U>
reduceKeys(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.Fun<? super K,? extends U> transformer, ConcurrentHashMapV8.BiFun<? super U,? super U,? extends U> reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all keys using the given reducer to combine values, or null if none.
static
<K,V> ForkJoinTask<Double>
reduceKeysToDouble(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.ObjectToDouble<? super K> transformer, double basis, ConcurrentHashMapV8.DoubleByDoubleToDouble reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all keys using the given reducer to combine values, and the given basis as an identity value.
static
<K,V> ForkJoinTask<Integer>
reduceKeysToInt(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.ObjectToInt<? super K> transformer, int basis, ConcurrentHashMapV8.IntByIntToInt reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all keys using the given reducer to combine values, and the given basis as an identity value.
static
<K,V> ForkJoinTask<Long>
reduceKeysToLong(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.ObjectToLong<? super K> transformer, long basis, ConcurrentHashMapV8.LongByLongToLong reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all keys using the given reducer to combine values, and the given basis as an identity value.
static
<K,V> ForkJoinTask<Double>
reduceToDouble(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.ObjectByObjectToDouble<? super K,? super V> transformer, double basis, ConcurrentHashMapV8.DoubleByDoubleToDouble reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all (key, value) pairs using the given reducer to combine values, and the given basis as an identity value.
static
<K,V> ForkJoinTask<Integer>
reduceToInt(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.ObjectByObjectToInt<? super K,? super V> transformer, int basis, ConcurrentHashMapV8.IntByIntToInt reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all (key, value) pairs using the given reducer to combine values, and the given basis as an identity value.
static
<K,V> ForkJoinTask<Long>
reduceToLong(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.ObjectByObjectToLong<? super K,? super V> transformer, long basis, ConcurrentHashMapV8.LongByLongToLong reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all (key, value) pairs using the given reducer to combine values, and the given basis as an identity value.
static
<K,V> ForkJoinTask<V>
reduceValues(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.BiFun<? super V,? super V,? extends V> reducer)
          Returns a task that when invoked, returns the result of accumulating all values using the given reducer to combine values, or null if none.
static
<K,V,U> ForkJoinTask<U>
reduceValues(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.Fun<? super V,? extends U> transformer, ConcurrentHashMapV8.BiFun<? super U,? super U,? extends U> reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all values using the given reducer to combine values, or null if none.
static
<K,V> ForkJoinTask<Double>
reduceValuesToDouble(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.ObjectToDouble<? super V> transformer, double basis, ConcurrentHashMapV8.DoubleByDoubleToDouble reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all values using the given reducer to combine values, and the given basis as an identity value.
static
<K,V> ForkJoinTask<Integer>
reduceValuesToInt(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.ObjectToInt<? super V> transformer, int basis, ConcurrentHashMapV8.IntByIntToInt reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all values using the given reducer to combine values, and the given basis as an identity value.
static
<K,V> ForkJoinTask<Long>
reduceValuesToLong(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.ObjectToLong<? super V> transformer, long basis, ConcurrentHashMapV8.LongByLongToLong reducer)
          Returns a task that when invoked, returns the result of accumulating the given transformation of all values using the given reducer to combine values, and the given basis as an identity value.
static
<K,V,U> ForkJoinTask<U>
search(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.BiFun<? super K,? super V,? extends U> searchFunction)
          Returns a task that when invoked, returns a non-null result from applying the given search function on each (key, value), or null if none.
static
<K,V,U> ForkJoinTask<U>
searchEntries(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.Fun<Map.Entry<K,V>,? extends U> searchFunction)
          Returns a task that when invoked, returns a non-null result from applying the given search function on each entry, or null if none.
static
<K,V,U> ForkJoinTask<U>
searchKeys(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.Fun<? super K,? extends U> searchFunction)
          Returns a task that when invoked, returns a non-null result from applying the given search function on each key, or null if none.
static
<K,V,U> ForkJoinTask<U>
searchValues(ConcurrentHashMapV8<K,V> map, ConcurrentHashMapV8.Fun<? super V,? extends U> searchFunction)
          Returns a task that when invoked, returns a non-null result from applying the given search function on each value, or null if none.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

forEach

public static <K,V> ForkJoinTask<Void> forEach(ConcurrentHashMapV8<K,V> map,
                                               ConcurrentHashMapV8.BiAction<K,V> action)
Returns a task that when invoked, performs the given action for each (key, value)

Parameters:
map - the map
action - the action
Returns:
the task

forEach

public static <K,V,U> ForkJoinTask<Void> forEach(ConcurrentHashMapV8<K,V> map,
                                                 ConcurrentHashMapV8.BiFun<? super K,? super V,? extends U> transformer,
                                                 ConcurrentHashMapV8.Action<U> action)
Returns a task that when invoked, performs the given action for each non-null transformation of each (key, value)

Parameters:
map - the map
transformer - a function returning the transformation for an element, or null of there is no transformation (in which case the action is not applied).
action - the action
Returns:
the task

search

public static <K,V,U> ForkJoinTask<U> search(ConcurrentHashMapV8<K,V> map,
                                             ConcurrentHashMapV8.BiFun<? super K,? super V,? extends U> searchFunction)
Returns a task that when invoked, returns a non-null result from applying the given search function on each (key, value), or null if none. Upon success, further element processing is suppressed and the results of any other parallel invocations of the search function are ignored.

Parameters:
map - the map
searchFunction - a function returning a non-null result on success, else null
Returns:
the task

reduce

public static <K,V,U> ForkJoinTask<U> reduce(ConcurrentHashMapV8<K,V> map,
                                             ConcurrentHashMapV8.BiFun<? super K,? super V,? extends U> transformer,
                                             ConcurrentHashMapV8.BiFun<? super U,? super U,? extends U> reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all (key, value) pairs using the given reducer to combine values, or null if none.

Parameters:
map - the map
transformer - a function returning the transformation for an element, or null of there is no transformation (in which case it is not combined).
reducer - a commutative associative combining function
Returns:
the task

reduceToDouble

public static <K,V> ForkJoinTask<Double> reduceToDouble(ConcurrentHashMapV8<K,V> map,
                                                        ConcurrentHashMapV8.ObjectByObjectToDouble<? super K,? super V> transformer,
                                                        double basis,
                                                        ConcurrentHashMapV8.DoubleByDoubleToDouble reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all (key, value) pairs using the given reducer to combine values, and the given basis as an identity value.

Parameters:
map - the map
transformer - a function returning the transformation for an element
basis - the identity (initial default value) for the reduction
reducer - a commutative associative combining function
Returns:
the task

reduceToLong

public static <K,V> ForkJoinTask<Long> reduceToLong(ConcurrentHashMapV8<K,V> map,
                                                    ConcurrentHashMapV8.ObjectByObjectToLong<? super K,? super V> transformer,
                                                    long basis,
                                                    ConcurrentHashMapV8.LongByLongToLong reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all (key, value) pairs using the given reducer to combine values, and the given basis as an identity value.

Parameters:
map - the map
transformer - a function returning the transformation for an element
basis - the identity (initial default value) for the reduction
reducer - a commutative associative combining function
Returns:
the task

reduceToInt

public static <K,V> ForkJoinTask<Integer> reduceToInt(ConcurrentHashMapV8<K,V> map,
                                                      ConcurrentHashMapV8.ObjectByObjectToInt<? super K,? super V> transformer,
                                                      int basis,
                                                      ConcurrentHashMapV8.IntByIntToInt reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all (key, value) pairs using the given reducer to combine values, and the given basis as an identity value.

Parameters:
transformer - a function returning the transformation for an element
basis - the identity (initial default value) for the reduction
reducer - a commutative associative combining function
Returns:
the task

forEachKey

public static <K,V> ForkJoinTask<Void> forEachKey(ConcurrentHashMapV8<K,V> map,
                                                  ConcurrentHashMapV8.Action<K> action)
Returns a task that when invoked, performs the given action for each key.

Parameters:
map - the map
action - the action
Returns:
the task

forEachKey

public static <K,V,U> ForkJoinTask<Void> forEachKey(ConcurrentHashMapV8<K,V> map,
                                                    ConcurrentHashMapV8.Fun<? super K,? extends U> transformer,
                                                    ConcurrentHashMapV8.Action<U> action)
Returns a task that when invoked, performs the given action for each non-null transformation of each key.

Parameters:
map - the map
transformer - a function returning the transformation for an element, or null of there is no transformation (in which case the action is not applied).
action - the action
Returns:
the task

searchKeys

public static <K,V,U> ForkJoinTask<U> searchKeys(ConcurrentHashMapV8<K,V> map,
                                                 ConcurrentHashMapV8.Fun<? super K,? extends U> searchFunction)
Returns a task that when invoked, returns a non-null result from applying the given search function on each key, or null if none. Upon success, further element processing is suppressed and the results of any other parallel invocations of the search function are ignored.

Parameters:
map - the map
searchFunction - a function returning a non-null result on success, else null
Returns:
the task

reduceKeys

public static <K,V> ForkJoinTask<K> reduceKeys(ConcurrentHashMapV8<K,V> map,
                                               ConcurrentHashMapV8.BiFun<? super K,? super K,? extends K> reducer)
Returns a task that when invoked, returns the result of accumulating all keys using the given reducer to combine values, or null if none.

Parameters:
map - the map
reducer - a commutative associative combining function
Returns:
the task

reduceKeys

public static <K,V,U> ForkJoinTask<U> reduceKeys(ConcurrentHashMapV8<K,V> map,
                                                 ConcurrentHashMapV8.Fun<? super K,? extends U> transformer,
                                                 ConcurrentHashMapV8.BiFun<? super U,? super U,? extends U> reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all keys using the given reducer to combine values, or null if none.

Parameters:
map - the map
transformer - a function returning the transformation for an element, or null of there is no transformation (in which case it is not combined).
reducer - a commutative associative combining function
Returns:
the task

reduceKeysToDouble

public static <K,V> ForkJoinTask<Double> reduceKeysToDouble(ConcurrentHashMapV8<K,V> map,
                                                            ConcurrentHashMapV8.ObjectToDouble<? super K> transformer,
                                                            double basis,
                                                            ConcurrentHashMapV8.DoubleByDoubleToDouble reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all keys using the given reducer to combine values, and the given basis as an identity value.

Parameters:
map - the map
transformer - a function returning the transformation for an element
basis - the identity (initial default value) for the reduction
reducer - a commutative associative combining function
Returns:
the task

reduceKeysToLong

public static <K,V> ForkJoinTask<Long> reduceKeysToLong(ConcurrentHashMapV8<K,V> map,
                                                        ConcurrentHashMapV8.ObjectToLong<? super K> transformer,
                                                        long basis,
                                                        ConcurrentHashMapV8.LongByLongToLong reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all keys using the given reducer to combine values, and the given basis as an identity value.

Parameters:
map - the map
transformer - a function returning the transformation for an element
basis - the identity (initial default value) for the reduction
reducer - a commutative associative combining function
Returns:
the task

reduceKeysToInt

public static <K,V> ForkJoinTask<Integer> reduceKeysToInt(ConcurrentHashMapV8<K,V> map,
                                                          ConcurrentHashMapV8.ObjectToInt<? super K> transformer,
                                                          int basis,
                                                          ConcurrentHashMapV8.IntByIntToInt reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all keys using the given reducer to combine values, and the given basis as an identity value.

Parameters:
map - the map
transformer - a function returning the transformation for an element
basis - the identity (initial default value) for the reduction
reducer - a commutative associative combining function
Returns:
the task

forEachValue

public static <K,V> ForkJoinTask<Void> forEachValue(ConcurrentHashMapV8<K,V> map,
                                                    ConcurrentHashMapV8.Action<V> action)
Returns a task that when invoked, performs the given action for each value.

Parameters:
map - the map
action - the action

forEachValue

public static <K,V,U> ForkJoinTask<Void> forEachValue(ConcurrentHashMapV8<K,V> map,
                                                      ConcurrentHashMapV8.Fun<? super V,? extends U> transformer,
                                                      ConcurrentHashMapV8.Action<U> action)
Returns a task that when invoked, performs the given action for each non-null transformation of each value.

Parameters:
map - the map
transformer - a function returning the transformation for an element, or null of there is no transformation (in which case the action is not applied).
action - the action

searchValues

public static <K,V,U> ForkJoinTask<U> searchValues(ConcurrentHashMapV8<K,V> map,
                                                   ConcurrentHashMapV8.Fun<? super V,? extends U> searchFunction)
Returns a task that when invoked, returns a non-null result from applying the given search function on each value, or null if none. Upon success, further element processing is suppressed and the results of any other parallel invocations of the search function are ignored.

Parameters:
map - the map
searchFunction - a function returning a non-null result on success, else null
Returns:
the task

reduceValues

public static <K,V> ForkJoinTask<V> reduceValues(ConcurrentHashMapV8<K,V> map,
                                                 ConcurrentHashMapV8.BiFun<? super V,? super V,? extends V> reducer)
Returns a task that when invoked, returns the result of accumulating all values using the given reducer to combine values, or null if none.

Parameters:
map - the map
reducer - a commutative associative combining function
Returns:
the task

reduceValues

public static <K,V,U> ForkJoinTask<U> reduceValues(ConcurrentHashMapV8<K,V> map,
                                                   ConcurrentHashMapV8.Fun<? super V,? extends U> transformer,
                                                   ConcurrentHashMapV8.BiFun<? super U,? super U,? extends U> reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all values using the given reducer to combine values, or null if none.

Parameters:
map - the map
transformer - a function returning the transformation for an element, or null of there is no transformation (in which case it is not combined).
reducer - a commutative associative combining function
Returns:
the task

reduceValuesToDouble

public static <K,V> ForkJoinTask<Double> reduceValuesToDouble(ConcurrentHashMapV8<K,V> map,
                                                              ConcurrentHashMapV8.ObjectToDouble<? super V> transformer,
                                                              double basis,
                                                              ConcurrentHashMapV8.DoubleByDoubleToDouble reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all values using the given reducer to combine values, and the given basis as an identity value.

Parameters:
map - the map
transformer - a function returning the transformation for an element
basis - the identity (initial default value) for the reduction
reducer - a commutative associative combining function
Returns:
the task

reduceValuesToLong

public static <K,V> ForkJoinTask<Long> reduceValuesToLong(ConcurrentHashMapV8<K,V> map,
                                                          ConcurrentHashMapV8.ObjectToLong<? super V> transformer,
                                                          long basis,
                                                          ConcurrentHashMapV8.LongByLongToLong reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all values using the given reducer to combine values, and the given basis as an identity value.

Parameters:
map - the map
transformer - a function returning the transformation for an element
basis - the identity (initial default value) for the reduction
reducer - a commutative associative combining function
Returns:
the task

reduceValuesToInt

public static <K,V> ForkJoinTask<Integer> reduceValuesToInt(ConcurrentHashMapV8<K,V> map,
                                                            ConcurrentHashMapV8.ObjectToInt<? super V> transformer,
                                                            int basis,
                                                            ConcurrentHashMapV8.IntByIntToInt reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all values using the given reducer to combine values, and the given basis as an identity value.

Parameters:
map - the map
transformer - a function returning the transformation for an element
basis - the identity (initial default value) for the reduction
reducer - a commutative associative combining function
Returns:
the task

forEachEntry

public static <K,V> ForkJoinTask<Void> forEachEntry(ConcurrentHashMapV8<K,V> map,
                                                    ConcurrentHashMapV8.Action<Map.Entry<K,V>> action)
Returns a task that when invoked, perform the given action for each entry.

Parameters:
map - the map
action - the action

forEachEntry

public static <K,V,U> ForkJoinTask<Void> forEachEntry(ConcurrentHashMapV8<K,V> map,
                                                      ConcurrentHashMapV8.Fun<Map.Entry<K,V>,? extends U> transformer,
                                                      ConcurrentHashMapV8.Action<U> action)
Returns a task that when invoked, perform the given action for each non-null transformation of each entry.

Parameters:
map - the map
transformer - a function returning the transformation for an element, or null of there is no transformation (in which case the action is not applied).
action - the action

searchEntries

public static <K,V,U> ForkJoinTask<U> searchEntries(ConcurrentHashMapV8<K,V> map,
                                                    ConcurrentHashMapV8.Fun<Map.Entry<K,V>,? extends U> searchFunction)
Returns a task that when invoked, returns a non-null result from applying the given search function on each entry, or null if none. Upon success, further element processing is suppressed and the results of any other parallel invocations of the search function are ignored.

Parameters:
map - the map
searchFunction - a function returning a non-null result on success, else null
Returns:
the task

reduceEntries

public static <K,V> ForkJoinTask<Map.Entry<K,V>> reduceEntries(ConcurrentHashMapV8<K,V> map,
                                                               ConcurrentHashMapV8.BiFun<Map.Entry<K,V>,Map.Entry<K,V>,? extends Map.Entry<K,V>> reducer)
Returns a task that when invoked, returns the result of accumulating all entries using the given reducer to combine values, or null if none.

Parameters:
map - the map
reducer - a commutative associative combining function
Returns:
the task

reduceEntries

public static <K,V,U> ForkJoinTask<U> reduceEntries(ConcurrentHashMapV8<K,V> map,
                                                    ConcurrentHashMapV8.Fun<Map.Entry<K,V>,? extends U> transformer,
                                                    ConcurrentHashMapV8.BiFun<? super U,? super U,? extends U> reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all entries using the given reducer to combine values, or null if none.

Parameters:
map - the map
transformer - a function returning the transformation for an element, or null of there is no transformation (in which case it is not combined).
reducer - a commutative associative combining function
Returns:
the task

reduceEntriesToDouble

public static <K,V> ForkJoinTask<Double> reduceEntriesToDouble(ConcurrentHashMapV8<K,V> map,
                                                               ConcurrentHashMapV8.ObjectToDouble<Map.Entry<K,V>> transformer,
                                                               double basis,
                                                               ConcurrentHashMapV8.DoubleByDoubleToDouble reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all entries using the given reducer to combine values, and the given basis as an identity value.

Parameters:
map - the map
transformer - a function returning the transformation for an element
basis - the identity (initial default value) for the reduction
reducer - a commutative associative combining function
Returns:
the task

reduceEntriesToLong

public static <K,V> ForkJoinTask<Long> reduceEntriesToLong(ConcurrentHashMapV8<K,V> map,
                                                           ConcurrentHashMapV8.ObjectToLong<Map.Entry<K,V>> transformer,
                                                           long basis,
                                                           ConcurrentHashMapV8.LongByLongToLong reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all entries using the given reducer to combine values, and the given basis as an identity value.

Parameters:
map - the map
transformer - a function returning the transformation for an element
basis - the identity (initial default value) for the reduction
reducer - a commutative associative combining function
Returns:
the task

reduceEntriesToInt

public static <K,V> ForkJoinTask<Integer> reduceEntriesToInt(ConcurrentHashMapV8<K,V> map,
                                                             ConcurrentHashMapV8.ObjectToInt<Map.Entry<K,V>> transformer,
                                                             int basis,
                                                             ConcurrentHashMapV8.IntByIntToInt reducer)
Returns a task that when invoked, returns the result of accumulating the given transformation of all entries using the given reducer to combine values, and the given basis as an identity value.

Parameters:
map - the map
transformer - a function returning the transformation for an element
basis - the identity (initial default value) for the reduction
reducer - a commutative associative combining function
Returns:
the task

Infinispan Distribution 5.2.6.Final-redhat-2

Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.