Overview Summary of Java Packages
Packages
Package | Description |
---|---|
groovyx.gpars |
This package holds classes for asynchronous collection processing.
|
groovyx.gpars.activeobject | |
groovyx.gpars.actor |
This package holds classes forming the public actor API.
|
groovyx.gpars.actor.impl |
This package holds classes some non-public aspects of actor implementation.
|
groovyx.gpars.agent | |
groovyx.gpars.dataflow |
This package holds classes for basic dataflow concurrency constructs, like dataflow variables, streams and threads.
|
groovyx.gpars.dataflow.expression | |
groovyx.gpars.dataflow.impl | |
groovyx.gpars.dataflow.operator |
This package holds classes representing operators and channels necessary for full dataflow concurrency.
|
groovyx.gpars.dataflow.operator.component | |
groovyx.gpars.dataflow.stream | |
groovyx.gpars.extra166y |
Collections supporting parallel operations.
|
groovyx.gpars.forkjoin | |
groovyx.gpars.group | |
groovyx.gpars.memoize | |
groovyx.gpars.pa | |
groovyx.gpars.remote |
This package holds classes implementing the remote actors functionality.
|
groovyx.gpars.remote.message |
This package holds message classes for the remote actors implementation.
|
groovyx.gpars.remote.netty |
This package holds implementation-specific classes implementing the remote actors functionality on top of Netty.
|
groovyx.gpars.scheduler |
This package holds thread pools / schedulers used by actors and dataflow concurrency.
|
groovyx.gpars.serial |
This package holds classes used for actor identification in the network.
|
groovyx.gpars.stm | |
groovyx.gpars.util |
Various utility classes enhancing basic Java concurrency constructs.
|
Purpose
The GPars framework provides straightforward Groovy-based Domain Specific Languages (DSLs) to declare, which parts of the code should be performed in parallel. Objects are enhanced with asynchronous methods like eachParallel(), collectParallel() and others, to perform collection-based operations in parallel. Also, closures can be turned into their asynchronous variants, which when invoked schedule the original closure for processing in an executor service. The library also provides several helper methods for running a set of closures concurrently.
Effective Scala-like actors are ready to make your code leverage an inherently safer way to organize concurrent code by eliminating mutable shared state altogether. With actors support you can quickly create several independent Actors, which consume messages passed to them in their own thread and communicate with other actors by sending them messages. You then build your solution by combining these actors into a communication network.
The library has four logical parts.
-
Actors provide a Groovy implementation of Scala-like actors, remote actors, Clojure-like agents and a couple of specialized actors like DynamicDispatchActor or Reactor.
-
Dataflow Concurrency (since version 0.8) allows for very natural shared-memory concurrency model, based on single-assignment variables.
-
And CSP implementation is available as well.
-
ThreadPool uses the Java 1.5 built-in support for executor services to enable multi-threaded collection and closure processing.
-
ForkJoinPool uses JSR-166y Parallel Arrays to enable multi-threaded collection processing.