org.springframework.data.hadoop.cascading
Class CascadingTasklet

java.lang.Object
  extended by org.springframework.data.hadoop.cascading.CascadingTasklet
All Implemented Interfaces:
Tasklet, DisposableBean

public class CascadingTasklet
extends Object
implements Tasklet

Batch tasklet for executing a Cascade as part of a job.

Author:
Costin Leau

Field Summary
protected  Log log
           
protected  UnitOfWork<? extends CascadingStats> uow
           
protected  boolean waitToComplete
           
 
Constructor Summary
CascadingTasklet()
           
 
Method Summary
 void destroy()
           
protected  CascadingStats execute()
           
 RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)
           
 boolean isWaitForCompletion()
          Indicates whether the 'runner' should wait for the UnitOfWork to complete (default).
 void setUnitOfWork(UnitOfWork<? extends CascadingStats> uow)
          Sets the unit of work.
 void setWaitForCompletion(boolean waitForCompletion)
          Indicates whether the 'runner' should wait for the UnitOfWork to complete (default) after submission or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

waitToComplete

protected boolean waitToComplete

uow

protected UnitOfWork<? extends CascadingStats> uow

log

protected Log log
Constructor Detail

CascadingTasklet

public CascadingTasklet()
Method Detail

execute

public RepeatStatus execute(StepContribution contribution,
                            ChunkContext chunkContext)
                     throws Exception
Specified by:
execute in interface Tasklet
Throws:
Exception

execute

protected CascadingStats execute()

destroy

public void destroy()
Specified by:
destroy in interface DisposableBean

setUnitOfWork

public void setUnitOfWork(UnitOfWork<? extends CascadingStats> uow)
Sets the unit of work. Can be of type Flow or Cascade.

Parameters:
uow - the new unit of work.

isWaitForCompletion

public boolean isWaitForCompletion()
Indicates whether the 'runner' should wait for the UnitOfWork to complete (default).

Returns:
whether the runner waits for the unit to complete or not.

setWaitForCompletion

public void setWaitForCompletion(boolean waitForCompletion)
Indicates whether the 'runner' should wait for the UnitOfWork to complete (default) after submission or not.

Parameters:
waitForCompletion - whether to wait for the unit to complete or not.