Revision 34342
Added by Nikon Gasparis over 9 years ago
ThreadExecutor.java | ||
---|---|---|
1 |
package eu.dnetlib.validator.service.impls.executors; |
|
2 |
|
|
3 |
import java.util.concurrent.ExecutorService; |
|
4 |
import java.util.concurrent.Future; |
|
5 |
|
|
6 |
import eu.dnetlib.validator.engine.execution.Executor; |
|
7 |
import eu.dnetlib.validator.engine.execution.TaskList; |
|
8 |
|
|
9 |
/** |
|
10 |
* An executor that executes a {@link TaskList} using an {@link ExecutorService} |
|
11 |
* @author Manos Karvounis |
|
12 |
* |
|
13 |
*/ |
|
14 |
public class ThreadExecutor implements Executor { |
|
15 |
|
|
16 |
private final ExecutorService executor; |
|
17 |
|
|
18 |
public ThreadExecutor(ExecutorService executor) { |
|
19 |
super(); |
|
20 |
this.executor = executor; |
|
21 |
} |
|
22 |
|
|
23 |
@Override |
|
24 |
public Future<?> execute(TaskList ltasks) { |
|
25 |
return executor.submit(ltasks); |
|
26 |
} |
|
27 |
} |
|
0 | 28 |
Also available in: Unified diff
*new version of validator service
*it now includes the validator implementation(replaces uoa-validator)
*registry for jobs,rules and providers is now removed.
*supports and implements the new ValidatorService interface
*new way to submit a new job (a common method is used for tests,registrations,or cris)
*content and usage jobs are now merged to one.
*listeners updated to support job merging
*works as standalone or with IS (BETA)