org.apache.ignite.internal.util.lang

## Class IgniteReducer2X<E1,E2,R>

- java.lang.Object
- - org.apache.ignite.internal.util.lang.IgniteReducer2X<E1,E2,R>

All Implemented Interfaces:
  Serializable, IgniteReducer2<E1,E2,R>, IgniteOutClosure<R>

Direct Known Subclasses:
  RX2

    public abstract class IgniteReducer2X<E1,E2,R>
    extends Object
    implements IgniteReducer2<E1,E2,R>

Convenient reducer subclass that allows for thrown grid exception. This class implements `apply()` method that calls `applyx()` method and properly wraps `IgniteCheckedException` into `GridClosureException` instance.

See Also:
  `RX2`, Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`IgniteReducer2X()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`R` `apply()` Closure body.
`abstract R` `applyx()` Reducer body that can throw `IgniteCheckedException`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.apache.ignite.internal.util.lang.IgniteReducer2

`collect`

### Constructor Detail

#### IgniteReducer2X

    public IgniteReducer2X()

### Method Detail

#### apply

    public R apply()

Closure body.

Specified by:
  `apply` in interface `IgniteOutClosure<R>`
Returns:
  Return value.

#### applyx

    public abstract R applyx()
                      throws IgniteCheckedException

Reducer body that can throw `IgniteCheckedException`.

Returns:
  Reducer return value.
Throws:
  `IgniteCheckedException` - Thrown in case of any error condition inside of the reducer.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021