|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PoolJobLoader loads the job data into the pool to be processed by
PoolJobProcessor(s). Along with the methods to load job data into the
pool, it exposes the some other methods used by the management and
monitoring clients.
Example loading the 100 integer objects into the pool.
public class MyPoolJobLoader implements PoolJobLoader { public ErrorCode loadPool(JobContext jobContext, JobPool pool) { for(int i=0;i<100;i++) pool.loadJobData(new Integer(i)); pool.loadJobData(null); return ErrorCode.JOB_COMPLETED_SUCCESSFULLY } // Implement all the other management and monitor APIs. }
Method Summary | |
java.lang.Object |
getLoaderState()
Gets the loader state as object which can be understan by the monitoring client. |
ProcessorStatus |
getLoaderStatus()
Gets the loader status. |
long |
getTotalJobDataCount()
Gets the total records this loader is going to load. |
ErrorCode |
loadPool(JobContext jobContext,
JobPool pool)
Loads the job data that needs to be processed in to the job pool. |
boolean |
resume()
Resumes the loader. |
boolean |
stop()
Stops the loader. |
boolean |
suspend()
Suspends the loader. |
Method Detail |
public ErrorCode loadPool(JobContext jobContext, JobPool pool)
Loads the job data that needs to be processed in to the job pool. When finished loading of all the job data, load null into the pool to singal the processor(s) that loading of all the jobData has been done. Configuration defined for this loader in job configuration can be accessed using job context reference.
jobContext
- Context of the job being run.pool
- Job Pool reference.
public boolean suspend()
public boolean resume()
public boolean stop()
public long getTotalJobDataCount()
public java.lang.Object getLoaderState()
public ProcessorStatus getLoaderStatus()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |