|
GridGain 3.6.0e
Enterprise Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gridgain.grid.lang.GridMetadataAwareAdapter
org.gridgain.grid.lang.GridLambdaAdapter
org.gridgain.grid.lang.GridOutClosure<T>
T - Type of return value from this closure.public abstract class GridOutClosure<T>
Defines a convenient side-effect only factory closure. This closure takes no parameters
and returns instance of given type every time its GridOutClosure.apply() method is called. Most
implementations will return a new instance every time, however, there's no requirement for that.
Note also that factory closure doesn't have free variables (i.e. it has void as its
fre variable).
Note that this class implements GridJob interface for convenience and can be
used in GridTask implementations directly, if needed, as an alternative to
GridJobAdapterEx.
| Wiki | |
| Forum |
GridFunc,
Serialized Form
![]() |
![]() |
| Constructor Summary | |
|---|---|
GridOutClosure()
|
|
| Method Summary | ||
|---|---|---|
|
andThen(GridClosure<T,A> c)
Gets closure that applies given closure over the result of this closure. |
|
GridAbsClosure |
andThen(GridInClosure<T> c)
Gets closure that applies given closure over the result of this closure. |
|
abstract T |
apply()
Factory closure body. |
|
T |
call()
Delegates to GridOutClosure.apply() method. |
|
void |
cancel()
Does nothing by default. |
|
Object |
execute()
Delegates to GridOutClosure.apply() method. |
|
|
uncurry()
Gets closure that ignores its argument and returns the same value as this out closure. |
|
|
uncurry2()
Gets closure that ignores its arguments and returns the same value as this out closure. |
|
|
uncurry3()
Gets closure that ignores its arguments and returns the same value as this out closure. |
|
| Methods inherited from class org.gridgain.grid.lang.GridLambdaAdapter |
|---|
classLoader, deployClass, peerDeployLike, withMeta |
| 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 class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.gridgain.grid.GridMetadataAware |
|---|
addMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, removeMeta, removeMeta, replaceMeta |
| Constructor Detail |
|---|
public GridOutClosure()
| Method Detail |
|---|
public abstract T apply()
public final T call()
GridOutClosure.apply() method.
call in interface Callable<T>public void cancel()
Note that this method is here only to support GridJob interface
and only makes sense whenever this class is used as grid job or is
executed via any of GridProjection methods.
This method is called when when system detects that completion of this
job can no longer alter the overall outcome (for example, when parent task
has already reduced the results). Job is also cancelled when
GridFuture.cancel() is called.
Note that job cancellation is only a hint, and just like with
Thread.interrupt() method, it is really up to the actual job
instance to gracefully finish execution and exit.
cancel in interface GridJobpublic <E> GridClosure<E,T> uncurry()
E - Type of ignore argument.
public <E1,E2> GridClosure2<E1,E2,T> uncurry2()
E1 - Type of 1st ignore argument.E2 - Type of 2nd ignore argument.
public <E1,E2,E3> GridClosure3<E1,E2,E3,T> uncurry3()
E1 - Type of 1st ignore argument.E2 - Type of 2nd ignore argument.E3 - Type of 3rd ignore argument.
public final Object execute()
throws GridException
GridOutClosure.apply() method.
Executes this job.
execute in interface GridJobGridException - If job execution caused an exception. This exception will be
returned in GridJobResult.getException() method passed into
GridTask.result(GridJobResult, List) method into task on caller node.
If execution produces a RuntimeException or Error, then
it will be wrapped into GridException.
null). This result will be returned
in GridJobResult.getData() method passed into
GridTask.result(GridJobResult, List) method into task on caller node.public <A> GridOutClosure<A> andThen(GridClosure<T,A> c)
this closure.
A - Return type of new closure.c - Closure.
public GridAbsClosure andThen(GridInClosure<T> c)
this closure.
c - Closure.
|
GridGain 3.6.0e
Enterprise Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
GridGain - Real Time Big Data
|
|
|