Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.ibm.jbatch.container.services.impl;
 
 
	private final static String sourceClass = SPIDelegatingThreadPoolServiceImpl.class.getName();
	private final static Logger logger = Logger.getLogger();
		// TODO Auto-generated constructor stub
	}
	public void init(IBatchConfig batchConfig) {
		// Don't want to get/cache anything here since we want to delegate each time.
	}
	public void shutdown() throws BatchContainerServiceException {
		String method = "shutdown";
		ExecutorService delegateService = BatchSPIManager.getInstance().getExecutorServiceProvider().getExecutorService();
		delegateService.shutdownNow();
	}
	public void executeTask(Runnable workObject config) {
		String method = "executeTask";
		ExecutorService delegateService = BatchSPIManager.getInstance().getExecutorServiceProvider().getExecutorService();
		delegateService.execute(work);
	}
    public ParallelTaskResult executeParallelTask(Runnable workObject config) {
        String method = "executeParallelTask";
        if(.isLoggable(.)) { .entering(method);  }
        
		ExecutorService delegateService = BatchSPIManager.getInstance().getExecutorServiceProvider().getExecutorService();
        Future result = delegateService.submit(work);
        ParallelTaskResult taskResult = new JSEResultAdapter(result);
        
        if(.isLoggable(.)) { .exiting(method);   }
        
        return taskResult;
    }
New to GrepCode? Check out our FAQ X