An open API service indexing awesome lists of open source software.

https://github.com/mikenew01/clark

Project clark aims to provide a library for parallel data processing.
https://github.com/mikenew01/clark

concurrency concurrent-programming executor-framework executor-service fork-join jar java java-7 java-7-compatible javase maven parallel parallel-processing

Last synced: 7 months ago
JSON representation

Project clark aims to provide a library for parallel data processing.

Awesome Lists containing this project

README

          

# CLARK

Project clark aims to provide a library for parallel data processing.

## How to use ?
To use the framework it is necessary that you have configured version 3 of maven and java 7 in the project.

### Example of use:a
````maven


com.github.maikoncanuto
clark
1.0.1


````

````java
//hidden imports

//Class responsible for containing processing logic
public class ExampleProcessor implements Processor {

@Override
public Result run(final List list) {
Result result = new Result();

for (Integer i : list) {
result.getProcessedElements().add(i + " - Test");
}

return result;
}
}

//Class responsible for performing the processing
public class Main {
public static void main(String[] args) throws ExecutionException, InterruptedException {

List numbers = Arrays.asList(1, 2, 3, 4);

Result result = ProcessorHandler
.getProcessor(Type.ASYNCHRONOUS)
.run(new Data<>(numbers), new ExampleProcessor());

System.out.println(result.getProcessedElements().size());
}
}

````