org.gridgain.grid.lang
Class GridClosureX<E,R>
java.lang.Object
org.gridgain.grid.lang.GridMetadataAwareAdapter
org.gridgain.grid.lang.GridLambdaAdapter
org.gridgain.grid.lang.GridClosure<E,R>
org.gridgain.grid.lang.GridClosureX<E,R>
- All Implemented Interfaces:
- Serializable, Cloneable, GridMetadataAware, GridPeerDeployAware, GridLambda
- Direct Known Subclasses:
- CX1
public abstract class GridClosureX<E,R>
- extends GridClosure<E,R>
Convenient closure subclass that allows for thrown grid exception. This class
implements GridClosureX.apply(Object) method that calls GridClosureX.applyx(Object) method
and properly wraps GridException into GridClosureException instance.
- See Also:
CX1,
Serialized Form
-

| Methods inherited from class org.gridgain.grid.lang.GridMetadataAwareAdapter |
addMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, readExternalMeta, removeMeta, removeMeta, replaceMeta, writeExternalMeta |
| Methods inherited from interface org.gridgain.grid.GridMetadataAware |
addMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, removeMeta, removeMeta, replaceMeta |
GridClosureX
public GridClosureX()
apply
public R apply(E e)
- Closure body.
- Specified by:
apply in class GridClosure<E,R>
- Parameters:
e - Bound free variable, i.e. the element the closure is called or closed on.
- Returns:
- Optional return value.
applyx
public abstract R applyx(E e)
throws GridException
- Closure body that can throw
GridException.
- Throws:
GridException - Thrown in case of any error condition inside of the closure.- Parameters:
e - The variable the closure is called or closed on.
- Returns:
- Optional return value.