├── .gitignore
├── .travis.yml
├── GPars_CI_only.iml
├── GPars_CI_only.ipr
├── LICENSE.txt
├── README.idea
├── README.md
├── artwork
├── GPars_logo.zip
├── gpars-logo.PNG
├── gpars-rgb-reverse-grey.svg
├── gpars-rgb-square-page.svg
├── gpars-rgb.svg
├── gpars_14x14.png
├── gpars_192x192.png
├── gpars_64x64.png
└── license.txt
├── bambooBuild
├── bambooBuildRelease
├── build.gradle
├── buildSrc
├── build.gradle
└── src
│ └── main
│ └── groovy
│ ├── Coverage.groovy
│ └── DemoTask.groovy
├── config
└── codenarc
│ └── codenarc.groovy
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── java-demo
├── .classpath
├── .project
├── .settings
│ └── org.eclipse.jdt.core.prefs
├── gpars-java-demo.iml
├── java-demo.iml
├── java-demo.ipr
├── pom.xml
└── src
│ └── test
│ └── java
│ └── org
│ └── codehaus
│ └── gpars
│ └── javademo
│ ├── AgentTest.java
│ ├── DataflowOperatorFibTest.java
│ ├── DataflowOperatorTest.java
│ ├── DataflowTaskTest.java
│ ├── ReactorTest.java
│ ├── StatefulActorTest.java
│ ├── StatelessActorTest.java
│ └── benchmark
│ ├── ActorBenchmarkTest.java
│ ├── DownloadStatefulDynamicDispatchActor.java
│ ├── IndexStatefulDynamicDispatchActor.java
│ ├── PipelineStatelessActorTest.java
│ ├── StatefulDynamicDispatchActor.java
│ └── WriteStatefulDynamicDispatchActor.java
├── lib
└── caliper-1.0-SNAPSHOT.jar
├── licenses
├── LICENSE-multiverse.txt
├── LICENSE-netty.txt
├── LICENSE.base64.txt
├── LICENSE.commons-logging.txt
├── LICENSE.felix.txt
├── LICENSE.guice.txt
├── LICENSE.jboss-logging.txt
├── LICENSE.jboss-microcontainer.txt
├── LICENSE.jsr166y.txt
├── LICENSE.log4j.txt
├── LICENSE.protobuf.txt
├── LICENSE.slf4j.txt
├── LICENSE.spring.txt
├── LICENSE.xnio.txt
└── NOTICE-netty.txt
├── overview.html
├── settings.gradle
└── src
├── main
├── assembly
│ └── all.xml
├── groovy
│ └── groovyx
│ │ └── gpars
│ │ ├── AsyncException.java
│ │ ├── AsyncFun.java
│ │ ├── DataflowMessagingRunnable.java
│ │ ├── Definitions.gdsl
│ │ ├── GParsConfig.java
│ │ ├── GParsExecutorsPool.groovy
│ │ ├── GParsExecutorsPoolEnhancer.groovy
│ │ ├── GParsExecutorsPoolUtil.groovy
│ │ ├── GParsPool.groovy
│ │ ├── GParsPoolUtil.java
│ │ ├── MessagingRunnable.java
│ │ ├── Parallel.groovy
│ │ ├── ParallelEnhancer.groovy
│ │ ├── ReactorMessagingRunnable.java
│ │ ├── ThreadLocalPools.java
│ │ ├── TransparentParallel.groovy
│ │ ├── activeobject
│ │ ├── ActiveMethod.java
│ │ ├── ActiveObject.java
│ │ ├── ActiveObjectASTTransformation.java
│ │ ├── ActiveObjectRegistry.java
│ │ ├── ActorWithExceptionHandler.java
│ │ └── InternalActor.java
│ │ ├── actor
│ │ ├── AbstractLoopingActor.java
│ │ ├── Actor.java
│ │ ├── ActorMessage.java
│ │ ├── ActorTimerTask.java
│ │ ├── Actors.java
│ │ ├── BlockingActor.java
│ │ ├── DDAHelper.groovy
│ │ ├── DefaultActor.java
│ │ ├── DefaultActorClosure.java
│ │ ├── DynamicDispatchActor.java
│ │ ├── ForwardingDelegate.java
│ │ ├── ReactiveActor.java
│ │ ├── StaticDispatchActor.java
│ │ ├── impl
│ │ │ ├── ActorException.java
│ │ │ ├── ActorReplyException.java
│ │ │ ├── ActorStopException.java
│ │ │ ├── ActorTerminationException.java
│ │ │ ├── DDAClosure.groovy
│ │ │ ├── MessageStream.java
│ │ │ ├── ReplyingMessageStream.java
│ │ │ ├── RunnableBackedBlockingActor.java
│ │ │ ├── SDAClosure.java
│ │ │ ├── SequentialProcessingActor.java
│ │ │ └── package.html
│ │ ├── package.html
│ │ └── remote
│ │ │ ├── RemoteActor.java
│ │ │ ├── RemoteActors.java
│ │ │ └── RemoteActorsUrlUtils.java
│ │ ├── agent
│ │ ├── Agent.java
│ │ ├── AgentBase.java
│ │ ├── AgentCore.java
│ │ ├── AgentThreadFactory.java
│ │ └── remote
│ │ │ ├── AgentClosureExecutionClosure.java
│ │ │ ├── AgentClosureExecutionPolicy.java
│ │ │ ├── RemoteAgent.java
│ │ │ ├── RemoteAgentMock.java
│ │ │ └── RemoteAgents.java
│ │ ├── csp
│ │ ├── ALT.groovy
│ │ ├── ChannelInputList.groovy
│ │ ├── ChannelOutputList.groovy
│ │ ├── GroovyMobileProcess.groovy
│ │ ├── JCSPCopy.groovy
│ │ ├── MobileAgent.groovy
│ │ ├── PAR.groovy
│ │ ├── plugAndPlay
│ │ │ ├── GConsole.groovy
│ │ │ ├── GConsoleStringToInteger.groovy
│ │ │ ├── GDelta2.groovy
│ │ │ ├── GFixedDelay.groovy
│ │ │ ├── GIdentity.groovy
│ │ │ ├── GIntegrate.groovy
│ │ │ ├── GNumbers.groovy
│ │ │ ├── GObjectToConsoleString.groovy
│ │ │ ├── GPCopy.groovy
│ │ │ ├── GPairs.groovy
│ │ │ ├── GParPrint.groovy
│ │ │ ├── GPlus.groovy
│ │ │ ├── GPrefix.groovy
│ │ │ ├── GPrint.groovy
│ │ │ ├── GSquares.groovy
│ │ │ ├── GStatePairs.groovy
│ │ │ ├── GSuccessor.groovy
│ │ │ └── GTail.groovy
│ │ └── util
│ │ │ ├── FairMultiplex.groovy
│ │ │ ├── Multiplexer.groovy
│ │ │ ├── PriMultiplex.groovy
│ │ │ ├── TestUtilities.groovy
│ │ │ └── TimedMultiplex.groovy
│ │ ├── dataflow
│ │ ├── BindErrorAdapter.java
│ │ ├── BindErrorListener.java
│ │ ├── DataCallback.java
│ │ ├── DataCallbackWithPool.java
│ │ ├── Dataflow.java
│ │ ├── DataflowBroadcast.java
│ │ ├── DataflowChannel.java
│ │ ├── DataflowChannelListener.java
│ │ ├── DataflowQueue.java
│ │ ├── DataflowReadChannel.java
│ │ ├── DataflowVariable.java
│ │ ├── DataflowWriteChannel.java
│ │ ├── Dataflows.java
│ │ ├── KanbanFlow.groovy
│ │ ├── KanbanLink.groovy
│ │ ├── KanbanTray.groovy
│ │ ├── LazyDataflowVariable.java
│ │ ├── ProcessingNode.groovy
│ │ ├── Promise.java
│ │ ├── Select.java
│ │ ├── SelectResult.java
│ │ ├── SelectableChannel.java
│ │ ├── SyncDataflowBroadcast.java
│ │ ├── SyncDataflowQueue.java
│ │ ├── SyncDataflowStreamReadAdapter.java
│ │ ├── SyncDataflowVariable.java
│ │ ├── expression
│ │ │ ├── DataflowComplexExpression.java
│ │ │ ├── DataflowExpression.java
│ │ │ ├── DataflowGetPropertyExpression.java
│ │ │ ├── DataflowInvocationExpression.java
│ │ │ └── RemoteDataflowExpression.java
│ │ ├── impl
│ │ │ ├── BindErrorDistributor.java
│ │ │ ├── BindErrorListenerManager.java
│ │ │ ├── DataflowChannelEventDistributor.java
│ │ │ ├── DataflowChannelEventListenerManager.java
│ │ │ ├── DataflowChannelEventOrchestrator.java
│ │ │ ├── GuardedSelectRequest.java
│ │ │ ├── ResizeableCountDownLatch.java
│ │ │ ├── SelectBase.java
│ │ │ ├── SelectCallback.java
│ │ │ ├── SelectRequest.java
│ │ │ └── ThenMessagingRunnable.java
│ │ ├── operator
│ │ │ ├── BinaryChoiceClosure.java
│ │ │ ├── ChainWithClosure.java
│ │ │ ├── ChoiceClosure.java
│ │ │ ├── ControlMessage.java
│ │ │ ├── CopyChannelsClosure.java
│ │ │ ├── CountingPoisonPill.java
│ │ │ ├── DataflowEventAdapter.java
│ │ │ ├── DataflowEventListener.java
│ │ │ ├── DataflowOperator.java
│ │ │ ├── DataflowOperatorActor.java
│ │ │ ├── DataflowPrioritySelector.java
│ │ │ ├── DataflowProcessor.java
│ │ │ ├── DataflowProcessorActor.java
│ │ │ ├── DataflowProcessorAtomicBoundAllClosure.java
│ │ │ ├── DataflowSelector.java
│ │ │ ├── DataflowSelectorActor.java
│ │ │ ├── FilterClosure.java
│ │ │ ├── ForkingDataflowOperatorActor.java
│ │ │ ├── ForkingDataflowSelectorActor.java
│ │ │ ├── ImmediateCountingPoisonPill.java
│ │ │ ├── Pipeline.java
│ │ │ ├── PoisonPill.java
│ │ │ ├── PoisonTrackCounter.java
│ │ │ ├── SeparationClosure.java
│ │ │ ├── StopGently.java
│ │ │ ├── component
│ │ │ │ ├── GracefulShutdownListener.java
│ │ │ │ ├── GracefulShutdownMonitor.java
│ │ │ │ ├── OperatorStateMonitor.java
│ │ │ │ └── ProcessorPauseResume.java
│ │ │ └── package.html
│ │ ├── package.html
│ │ ├── remote
│ │ │ ├── RemoteDataflowBroadcast.java
│ │ │ ├── RemoteDataflowQueue.java
│ │ │ ├── RemoteDataflowVariable.java
│ │ │ └── RemoteDataflows.java
│ │ └── stream
│ │ │ ├── DataflowStream.java
│ │ │ ├── DataflowStreamReadAdapter.java
│ │ │ ├── DataflowStreamWriteAdapter.java
│ │ │ ├── FList.java
│ │ │ ├── FListIterator.java
│ │ │ ├── StreamCore.java
│ │ │ └── SyncDataflowStream.java
│ │ ├── forkjoin
│ │ ├── AbstractForkJoinWorker.java
│ │ ├── CallAsyncTask.java
│ │ ├── FJWorker.java
│ │ ├── ForkJoinUtils.java
│ │ └── GParsPoolUtilHelper.groovy
│ │ ├── group
│ │ ├── DefaultPGroup.java
│ │ ├── NonDaemonPGroup.java
│ │ ├── PGroup.java
│ │ └── PGroupBuilder.java
│ │ ├── pa
│ │ ├── AbstractPAWrapper.groovy
│ │ ├── CallAsyncTask.java
│ │ ├── CallClosure.java
│ │ ├── ClosureMapper.java
│ │ ├── ClosureNegationPredicate.java
│ │ ├── ClosurePredicate.java
│ │ ├── ClosureReducer.java
│ │ ├── CombineHolder.java
│ │ ├── GParsPoolUtilHelper.groovy
│ │ ├── MappedPAWrapper.groovy
│ │ ├── PAWrapper.groovy
│ │ └── SumClosure.java
│ │ ├── package.html
│ │ ├── remote
│ │ ├── BroadcastDiscovery.java
│ │ ├── LocalHost.java
│ │ ├── RemoteConnection.java
│ │ ├── RemoteHost.java
│ │ ├── RemotingContextWithUrls.java
│ │ ├── message
│ │ │ ├── CloseConnectionMsg.java
│ │ │ ├── HostIdMsg.java
│ │ │ ├── RemoteActorReplyMsg.java
│ │ │ ├── RemoteActorRequestMsg.java
│ │ │ ├── RemoteAgentGetValMsg.java
│ │ │ ├── RemoteAgentReplyMsg.java
│ │ │ ├── RemoteAgentRequestMsg.java
│ │ │ ├── RemoteAgentSendClosureMessage.java
│ │ │ ├── RemoteAgentSendMessage.java
│ │ │ ├── RemoteDataflowBroadcastReplyMsg.java
│ │ │ ├── RemoteDataflowBroadcastRequestMsg.java
│ │ │ ├── RemoteDataflowQueueEnqueueValueMsg.java
│ │ │ ├── RemoteDataflowQueueReplyMsg.java
│ │ │ ├── RemoteDataflowQueueRequestMsg.java
│ │ │ ├── RemoteDataflowQueueValueRequestMsg.java
│ │ │ ├── RemoteDataflowVariableReplyMsg.java
│ │ │ ├── RemoteDataflowVariableRequestMsg.java
│ │ │ └── package.html
│ │ ├── netty
│ │ │ ├── ConnectListener.java
│ │ │ ├── NettyChannelInitializer.java
│ │ │ ├── NettyClient.java
│ │ │ ├── NettyHandler.java
│ │ │ ├── NettyRemoteConnection.java
│ │ │ ├── NettyServer.java
│ │ │ ├── NettyTransportProvider.java
│ │ │ ├── RemoteObjectDecoder.java
│ │ │ ├── RemoteObjectEncoder.java
│ │ │ ├── discovery
│ │ │ │ ├── DiscoveryClient.java
│ │ │ │ ├── DiscoveryClientHandler.java
│ │ │ │ ├── DiscoveryRequest.java
│ │ │ │ ├── DiscoveryRequestDecoder.java
│ │ │ │ ├── DiscoveryRequestEncoder.java
│ │ │ │ ├── DiscoveryRequestWithSender.java
│ │ │ │ ├── DiscoveryResponse.java
│ │ │ │ ├── DiscoveryResponseDecoder.java
│ │ │ │ ├── DiscoveryResponseWithRecipient.java
│ │ │ │ ├── DiscoveryResponseWithRecipientEncoder.java
│ │ │ │ ├── DiscoveryServer.java
│ │ │ │ └── DiscoveryServerHandler.java
│ │ │ └── package.html
│ │ └── package.html
│ │ ├── scheduler
│ │ ├── DefaultPool.java
│ │ ├── FJPool.java
│ │ ├── Pool.java
│ │ ├── ResizeablePool.java
│ │ ├── Scheduler.java
│ │ ├── Timer.java
│ │ └── package.html
│ │ ├── serial
│ │ ├── DefaultRemoteHandle.java
│ │ ├── LocalHandle.java
│ │ ├── RemoteHandle.java
│ │ ├── RemoteSerialized.java
│ │ ├── SerialContext.java
│ │ ├── SerialHandle.java
│ │ ├── SerialHandles.java
│ │ ├── SerialMsg.java
│ │ ├── WithSerialId.java
│ │ └── package.html
│ │ ├── stm
│ │ ├── GParsAtomicBooleanBlock.java
│ │ ├── GParsAtomicDoubleBlock.java
│ │ ├── GParsAtomicIntBlock.java
│ │ ├── GParsAtomicLongBlock.java
│ │ ├── GParsAtomicVoidBlock.java
│ │ ├── GParsStm.java
│ │ └── GParsTxnExecutor.java
│ │ ├── streams
│ │ ├── ClosureConsumer.java
│ │ └── ClosureReducer.java
│ │ └── util
│ │ ├── ASTUtils.java
│ │ ├── AsyncFunASTTransformation.java
│ │ ├── AsyncMessagingCore.java
│ │ ├── AsyncUtils.java
│ │ ├── DefaultMessageQueue.java
│ │ ├── EnhancedRWLock.java
│ │ ├── EnhancedSemaphore.java
│ │ ├── FQMessageQueue.java
│ │ ├── GeneralTimer.java
│ │ ├── MessageQueue.java
│ │ ├── PAGroovyUtils.groovy
│ │ ├── PAUtils.java
│ │ ├── ParallelUtils.java
│ │ ├── PoolFactory.java
│ │ ├── PoolUtils.java
│ │ ├── TimerFactory.java
│ │ └── package.html
└── resources
│ └── META-INF
│ ├── LICENSE.txt
│ ├── LICENSE_JUnit.txt
│ ├── NOTICE.txt
│ ├── README
│ └── ReleaseNotest.txt
└── test
└── groovy
└── groovyx
└── gpars
├── AsyncFunAnnotationTest.groovy
├── AsyncInvocationWithTimeoutTest.groovy
├── AsynchronizerDSLTest.groovy
├── AsynchronizerExceptionTest.groovy
├── AsynchronizerIteratorTest.groovy
├── AsynchronizerStringTest.groovy
├── AsynchronizerTest.groovy
├── DataflowMessagingRunnableTest.groovy
├── DemoCar.groovy
├── ForkJoinPoolAsyncTest.groovy
├── ForkJoinPoolDSLTest.groovy
├── ForkJoinPoolStringTest.groovy
├── GParsExecutorsPoolAsyncFunTest.groovy
├── GParsExecutorsPoolEnhancerTest.groovy
├── GParsExecutorsPoolOnMapTest.groovy
├── GParsExecutorsPoolUtilTest.groovy
├── GParsPoolAsyncFunTest.groovy
├── GParsPoolOnMapTest.groovy
├── GParsPoolUtilTest.groovy
├── MakeConcurrentAndSequentialEnhancerTest.groovy
├── MakeConcurrentAndSequentialTest.groovy
├── MakeTransparentCornerCaseEnhancerTest.groovy
├── MakeTransparentCornerCaseTest.groovy
├── MakeTransparentEnhancerTest.groovy
├── MakeTransparentMethodEnhancerTest.groovy
├── MakeTransparentMethodTest.groovy
├── MakeTransparentTest.groovy
├── MapReduceSpockTest.groovy
├── MapReduceTest.groovy
├── MessageStreamTest.groovy
├── MessagingRunnableTest.groovy
├── ParallelArrayTest.groovy
├── ParallelEnhancerTest.groovy
├── ParallelGroupTest.groovy
├── ParallelizerTest.groovy
├── ReactorMessagingRunnableTest.groovy
├── SpeculationTest.groovy
├── activeobject
├── ActiveObjectASTTransformationTest.groovy
├── ActiveObjectExceptionASTTransformationTest.groovy
├── ActiveObjectGroupASTTransformationTest.groovy
├── DFVASTTransformationTest.groovy
├── InheritedPropertiesTest.groovy
├── NonBlockingActiveObjectTest.groovy
└── NonBlockingTypesTest.groovy
├── actor
├── AbstractLoopingActorTest.groovy
├── AfterStopTest.groovy
├── DDAReplyTest.groovy
├── DefaultActorCreationTest.groovy
├── MemoryPropagationTest.groovy
├── MessageTypesTest.groovy
├── blocking
│ ├── AbstractActorTest.groovy
│ ├── ActorThreadTest.groovy
│ ├── ActorsTest.groovy
│ ├── ArraySumTest.groovy
│ ├── DefaultActorTest.groovy
│ ├── DeliveryErrorTest.groovy
│ ├── ImmutableMessageTest.groovy
│ ├── JoinTest.groovy
│ ├── MergeSortTest.groovy
│ ├── NestedClosureTest.groovy
│ ├── NullMessageTest.groovy
│ ├── ReplyTest.groovy
│ ├── ReplyToMessageTest.groovy
│ ├── SendAndWaitTest.groovy
│ └── TimeCategoryActorsTest.groovy
├── nonBlocking
│ ├── ConditionalLoopTest.groovy
│ ├── DDALifeCycleTest.groovy
│ ├── DeliveryErrorTest.groovy
│ ├── DynamicDispatchActorTest.groovy
│ ├── ImmutableMessageTest.groovy
│ ├── JoinTest.groovy
│ ├── LifeCycleTest.groovy
│ ├── LifecycleErrorTest.groovy
│ ├── LoopTest.groovy
│ ├── MessagingTest.groovy
│ ├── NestedClosureTest.groovy
│ ├── NullMessageTest.groovy
│ ├── PooledActorThreadTest.groovy
│ ├── PooledMergeSortTest.groovy
│ ├── ReactorLifeCycleTest.groovy
│ ├── ReactorTest.groovy
│ ├── ReceiveTest.groovy
│ ├── RepeatLoopTest.groovy
│ ├── ReplyTest.groovy
│ ├── ReplyToMessageTest.groovy
│ ├── SendAndWaitTest.groovy
│ ├── SharedMemoryTest.groovy
│ ├── SingleThreadLoopTest.groovy
│ ├── SingleThreadedLifeCycleTest.groovy
│ ├── SingleThreadedMessagingTest.groovy
│ ├── StaticDispatchActorTest.groovy
│ ├── TimeCategoryTimeoutTest.groovy
│ └── TimeoutTest.groovy
└── remote
│ └── RemoteActorsUrlUtilsTest.groovy
├── agent
├── AgentListenerParametersTest.groovy
├── AgentListenerTest.groovy
├── AgentTest.groovy
└── remote
│ └── RemoteAgentsTest.groovy
├── benchmark
├── BenchmarkGParsPool.groovy
├── actorComparison
│ ├── BenchmarkActiveObjectsWithArray.groovy
│ ├── BenchmarkActorsContention.groovy
│ ├── BenchmarkActorsContentionWithDDAs.groovy
│ ├── BenchmarkActorsContentionWithFactory.groovy
│ ├── BenchmarkAgent.groovy
│ ├── BenchmarkReactor.groovy
│ ├── BenchmarkReactors.groovy
│ ├── BenchmarkSafe.groovy
│ ├── BenchmarkSelectors.groovy
│ ├── BenchmarkStatefulActors.groovy
│ ├── BenchmarkStatefulActorsNoLoop.groovy
│ ├── BenchmarkStatefulActorsWithArray.groovy
│ ├── BenchmarkStatelessActors.groovy
│ ├── BenchmarkStatelessActorsWithArray.groovy
│ ├── BenchmarkStatelessActorsWithWhenClause.groovy
│ ├── BenchmarkStaticActorsWithArray.groovy
│ ├── BenchmarkTwoDynamicDispatchActors.groovy
│ └── BenchmarkTwoStaticDispatchActors.groovy
├── akka
│ ├── Messages.groovy
│ ├── PipelineBenchmark.groovy
│ ├── PipelineDynamicDispatchActorScript.groovy
│ ├── PipelineStatefulActor.groovy
│ ├── PipelineStatefulNoLoop.groovy
│ └── PipelineStaticDispatchActorScript.groovy
├── caliper
│ ├── BenchmarkRunner.java
│ ├── README.md
│ ├── akka
│ │ ├── BenchmarkCaliper.java
│ │ ├── BenchmarkLatencyDynamicDispatchActorCaliper.java
│ │ ├── BenchmarkLatencyStaticDispatchActorCaliper.java
│ │ ├── BenchmarkThroughputComputationDynamicActorCaliper.java
│ │ ├── BenchmarkThroughputComputationStaticActorCaliper.java
│ │ ├── BenchmarkThroughputDynamicDispatchActorCaliper.java
│ │ └── BenchmarkThroughputStaticDispatchActorCaliper.java
│ ├── chart
│ │ ├── ChartBuilder.java
│ │ ├── GoogleChartBuilder.groovy
│ │ ├── HTMLBuilder.groovy
│ │ └── JsonFileParser.java
│ ├── instrument
│ │ ├── LatencyMeasurementInstrument.java
│ │ └── ThroughputMeasurementInstrument.java
│ └── worker
│ │ ├── LatencyMeasurementWorker.java
│ │ └── ThroughputMeasurementWorker.java
├── dataflow
│ ├── BenchmarkDataflowQueue.groovy
│ ├── BenchmarkDataflowStream.groovy
│ ├── BenchmarkMultiOperators.groovy
│ └── BenchmarkOperators.groovy
└── embarrassinglyParallel
│ ├── BenchmarkActorOnPICalculation.groovy
│ ├── BenchmarkActorsVsThreads.groovy
│ ├── BenchmarkCollections.groovy
│ └── BenchmarkThreads.groovy
├── dataflow
├── AsyncSelectTest.groovy
├── DFSpockTest.groovy
├── DataflowChannelChainingDSLTest.groovy
├── DataflowChannelChainingTest.groovy
├── DataflowChannelFilterTest.groovy
├── DataflowChannelLengthTest.groovy
├── DataflowChannelMapperTest.groovy
├── DataflowQueueTest.groovy
├── DataflowReadChannelEventTest.groovy
├── DataflowTaskTest.groovy
├── DataflowTest.groovy
├── DataflowVariableBindErrorTest.groovy
├── DataflowVariableTest.groovy
├── DataflowsTest.groovy
├── ErrorHandlerTest.groovy
├── ForkAndJoinPromiseTest.groovy
├── KanbanFlowTest.groovy
├── LazyDataflowVariableTest.groovy
├── LazyTaskTest.groovy
├── SelectTest.groovy
├── SelectToPromiseTest.groovy
├── SyncChannelsWithOperatorsTest.groovy
├── SyncChannelsWithSelectTest.groovy
├── SyncDataflowBroadcastTest.groovy
├── SyncDataflowQueueTest.groovy
├── SyncDataflowVariableDefaultTest.groovy
├── SyncDataflowVariableTest.groovy
├── ThreadLifeCycleTest.groovy
├── WhenBoundChainingTest.groovy
├── expression
│ └── DataflowExpressionTest.groovy
├── impl
│ └── ResizeableCountDownLatchTest.groovy
├── operator
│ ├── DataflowOperatorCountingShutdownTest.groovy
│ ├── DataflowOperatorGentlyStopTest.groovy
│ ├── DataflowOperatorShutdownTest.groovy
│ ├── DataflowOperatorTest.groovy
│ ├── DataflowPrioritySelectorTest.groovy
│ ├── DataflowProcessorEventExceptionTest.groovy
│ ├── DataflowProcessorEventRewritingTest.groovy
│ ├── DataflowProcessorEventTest.groovy
│ ├── DataflowProcessorJavaAPITest.groovy
│ ├── DataflowProcessorStateObjectTest.groovy
│ ├── DataflowSelectorTest.groovy
│ ├── DataflowTaskTest.groovy
│ ├── InternallyParallelDataflowOperatorTest.groovy
│ ├── InternallyParallelDataflowSelectorTest.groovy
│ ├── PipelineFilterTest.groovy
│ ├── PipelineTest.groovy
│ ├── PoisonWithForkProcessorTest.groovy
│ ├── SplitterTest.groovy
│ └── component
│ │ ├── GracefulShutdownTest.groovy
│ │ ├── ProcessorPauseResumeTest.groovy
│ │ └── TestControlMessage.groovy
├── remote
│ ├── RemoteDataflowsDataflowBroadcastTest.groovy
│ ├── RemoteDataflowsDataflowQueueTest.groovy
│ └── RemoteDataflowsDataflowVariableTest.groovy
└── stream
│ ├── DataflowStreamAdapterTest.groovy
│ ├── DataflowStreamBroadCastTest.groovy
│ ├── DataflowStreamOperatorTest.groovy
│ ├── DataflowStreamTest.groovy
│ ├── DataflowStreamWriteAdapterTest.groovy
│ ├── StreamAsDataflowChannelTest.groovy
│ ├── SyncDataflowStreamDefaultTest.groovy
│ └── SyncDataflowStreamTest.groovy
├── forkjoin
├── DirectChildrenCallTest.groovy
├── ForkJoinBuilderTest.groovy
└── ForkJoinTest.groovy
├── groups
├── FJGroupTest.groovy
├── PGroupBuilderTest.groovy
└── PGroupTest.groovy
├── integration
├── AwaitTaskTerminationTest.groovy
└── remote
│ ├── DiscoveryServiceTest.groovy
│ ├── RemoteSpecification.groovy
│ ├── actor
│ ├── RemoteActorTest.groovy
│ ├── RemoteActorsTest.groovy
│ └── RemoteActorsWithNamesTest.groovy
│ ├── agent
│ └── RemoteAgentsWithServerTest.groovy
│ └── dataflow
│ ├── RemoteDataflowsDataflowBroadcastWithServerTest.groovy
│ ├── RemoteDataflowsDataflowQueueWithServerTest.groovy
│ └── RemoteDataflowsDataflowVariableWithServerTest.groovy
├── issues
├── ImmutableAct.groovy
├── ImmutableMessageIssue.groovy
├── MixinIssue1.groovy
├── MixinIssue2.groovy
├── MixinIssue3.groovy
└── PropertyIssues.groovy
├── remote
├── LocalHostMock.groovy
├── LocalHostTest.groovy
└── netty
│ ├── NettyClientServerTest.groovy
│ ├── NettyClientTest.groovy
│ ├── NettyServerTest.groovy
│ └── discovery
│ ├── DiscoveryIntegrationTest.groovy
│ ├── DiscoveryRequestDecoderTest.groovy
│ ├── DiscoveryRequestEncoderTest.groovy
│ ├── DiscoveryResponseDecoderTest.groovy
│ └── DiscoveryResponseWithRecipientEncoderTest.groovy
├── samples
├── activeobject
│ ├── DemoActiveObject.groovy
│ ├── DemoAsynchronousActiveObject.groovy
│ ├── DemoBlockingActiveObject.groovy
│ ├── DemoComposingResults.groovy
│ ├── DemoComposingResultsDetailed.groovy
│ └── DemoSwingLifeWithActiveObjects.groovy
├── actors
│ ├── DemoSwingLifeWithActors.groovy
│ ├── blocking
│ │ └── DemoBlockingDecryptor.groovy
│ ├── dda
│ │ ├── DemoDynamicDispatchActor.groovy
│ │ └── DemoSieveEratosthenesActors.groovy
│ ├── reactor
│ │ ├── DemoReactor1.groovy
│ │ ├── DemoReactor2.groovy
│ │ ├── DemoSleepingBarber.groovy
│ │ ├── DemoSleepingBarber_RW.groovy
│ │ └── DemoSleepingLazyBarber.groovy
│ ├── sda
│ │ ├── DemoStaticDispatchActor.groovy
│ │ └── DemoStaticDispatchActorUsingFactory.groovy
│ ├── stateful
│ │ ├── DemoConditionalLoop.groovy
│ │ ├── DemoCountingLoop.groovy
│ │ ├── DemoCurriedActorChain.groovy
│ │ ├── DemoDecryptor.groovy
│ │ ├── DemoDiningPhilosophers.groovy
│ │ ├── DemoEventMergeSort.groovy
│ │ ├── DemoForwarding.groovy
│ │ ├── DemoGuessGame.groovy
│ │ ├── DemoLoadBalancer.groovy
│ │ ├── DemoMultiMessage.groovy
│ │ ├── DemoNestedLoops.groovy
│ │ ├── DemoNestedLoopsWithClosures.groovy
│ │ ├── DemoNestedLoopsWithMetaClass.groovy
│ │ ├── DemoNestedMethodCalls.groovy
│ │ ├── DemoOnDeliveryError.groovy
│ │ ├── DemoPipelinedActors.groovy
│ │ ├── DemoPooledGroups.groovy
│ │ ├── DemoPooledLifeCycleMethods.groovy
│ │ ├── DemoReply.groovy
│ │ ├── DemoReplyCompileStatic.groovy
│ │ ├── DemoRockPaperScissors.groovy
│ │ ├── DemoStockPrices.groovy
│ │ ├── DemoStockPricesWithCoordinatingActor.groovy
│ │ ├── DemoStockPricesWithResultActor.groovy
│ │ └── DemoWordSort.groovy
│ └── visual
│ │ ├── DemoSwing.groovy
│ │ └── DemoSwingActors.groovy
├── agent
│ ├── DemoAdvancedThreadSafeCounter.groovy
│ ├── DemoAgent.groovy
│ ├── DemoAgentWithCustomPool.groovy
│ ├── DemoCart.groovy
│ ├── DemoListenersAndValidators.groovy
│ ├── DemoNameSafe.groovy
│ ├── DemoNestedSafeVariable.groovy
│ ├── DemoPrintingService.groovy
│ ├── DemoSafeAccountTransfer.groovy
│ ├── DemoSafeList.groovy
│ ├── DemoThreadSafeCounter.groovy
│ └── DemoValidatorGotchas.groovy
├── collections
│ ├── DemoAsynchronousProcessingr.groovy
│ ├── DemoCombine.groovy
│ ├── DemoCombineWithClone.groovy
│ ├── DemoCombineWithCreatorClosure.groovy
│ ├── DemoGParsExecutorsPool.groovy
│ ├── DemoGParsExecutorsPoolAsyncClosures.groovy
│ ├── DemoGParsExecutorsPoolEnhancer.groovy
│ ├── DemoGParsExecutorsPoolParallelFunctionInvocation.groovy
│ ├── DemoImmutableAccountTransfer.groovy
│ ├── DemoImmutableAccountTransfer2.groovy
│ ├── DemoMapReduce.groovy
│ ├── DemoParallelArray.groovy
│ ├── DemoParallelCollections.groovy
│ ├── DemoParallelCollectionsWithAsConcurrent.groovy
│ ├── DemoParallelCollectionsWithConcurrentAndSequentialSemantics.groovy
│ ├── DemoParallelEnhancer.groovy
│ ├── DemoParallelEnhancerWithAsConcurrent.groovy
│ ├── DemoParallelEnhancerWithConcurrentAndSequentialSemantics.groovy
│ ├── DemoParallelEnhancerWithConcurrentSemantics.groovy
│ ├── DemoParallelMaps.groovy
│ ├── DemoParallelTransparentCollections.groovy
│ ├── DemoParallelWordCount.groovy
│ ├── DemoQuicksort.groovy
│ ├── DemoQuicksortMapReduce.groovy
│ ├── DemoSleepingBarberWithQueue.groovy
│ ├── DemoSpeculations.groovy
│ ├── DemoSpeculativeDownloads.groovy
│ ├── DemoSwingCollectionProcessing.groovy
│ ├── DemoSwingMashup.groovy
│ └── DemoSynchronizedAccountTransfer.groovy
├── csp
│ ├── DemoNumbers.groovy
│ ├── DemoSieveEratosthenesCSP.groovy
│ ├── DemoThreading.groovy
│ ├── FibonacciV1.groovy
│ ├── FibonacciV2.groovy
│ ├── proposed
│ │ ├── ResetNumbers.groovy
│ │ ├── ResetPrefix.groovy
│ │ ├── ResetUser.groovy
│ │ └── RunReset.groovy
│ └── resetexamples
│ │ ├── ResetNumbers.groovy
│ │ ├── ResetPrefix.groovy
│ │ ├── ResetUser.groovy
│ │ └── RunReset.groovy
├── dataflow
│ ├── BenchmarkManyDataflowVariables.groovy
│ ├── DataflowDemo1.groovy
│ ├── DataflowDemo2.groovy
│ ├── DataflowDemo3.groovy
│ ├── DataflowDemo4.groovy
│ ├── DataflowDemo5.groovy
│ ├── DataflowDemo6.groovy
│ ├── DemoAsyncFunctionsFibonacci.groovy
│ ├── DemoAsyncFunctionsSum.groovy
│ ├── DemoAsynchronousFunctionsFibonacci.groovy
│ ├── DemoAsynchronousFunctionsSum.groovy
│ ├── DemoAvoidPotentialDeadlock1.groovy
│ ├── DemoAvoidingPotentialDeadlock2.groovy
│ ├── DemoBuildProcess.groovy
│ ├── DemoBuildProcessWithFunctions.groovy
│ ├── DemoBuildProcessWithOperators.groovy
│ ├── DemoCallCenterWithAsyncTasks.groovy
│ ├── DemoCallCenterWithTasks.groovy
│ ├── DemoCombiningAsyncFunctions.groovy
│ ├── DemoCombiningAsyncFunctionsInFreeStyle.groovy
│ ├── DemoCombiningAsyncFunctionsWithDelayedPool.groovy
│ ├── DemoCombiningAsyncFunctionsWithExplicitPool.groovy
│ ├── DemoContinuations.groovy
│ ├── DemoDFStreamSpeculations.groovy
│ ├── DemoDFVSpeculations.groovy
│ ├── DemoDataflowBroadcastMultipleReaders.groovy
│ ├── DemoDataflowBroadcastStream.groovy
│ ├── DemoDataflowOperator.groovy
│ ├── DemoDataflowQueueIteration.groovy
│ ├── DemoDataflowQueueMultipleReaders.groovy
│ ├── DemoDataflows.groovy
│ ├── DemoDataflowsPolished.groovy
│ ├── DemoDeadLock.groovy
│ ├── DemoDownloadingAsyncFunctions.groovy
│ ├── DemoDownloadingAsyncFunctionsWithAnnotation.groovy
│ ├── DemoDownloadingAsyncFunctionsWithMethods.groovy
│ ├── DemoJoinActivitiesThroughPromises.groovy
│ ├── DemoJoinPromises.groovy
│ ├── DemoJoinPromisesWithErrorHandling.groovy
│ ├── DemoJoiningTasks.groovy
│ ├── DemoLazyDataflowVariable.groovy
│ ├── DemoLazyDataflowVariableDependencies.groovy
│ ├── DemoLazyTask.groovy
│ ├── DemoLazyTaskDependencies.groovy
│ ├── DemoLifeWithDataflowOperators.groovy
│ ├── DemoManyDataflows.groovy
│ ├── DemoMashupWithMethods.groovy
│ ├── DemoNonDeterministicDeadlockWithDataflows.groovy
│ ├── DemoNormalThreadDataflow.groovy
│ ├── DemoPerfectNumbers.groovy
│ ├── DemoPhysicalCalculations.groovy
│ ├── DemoPriceEstimate.groovy
│ ├── DemoProducerConsumer1.groovy
│ ├── DemoProducerConsumer2.groovy
│ ├── DemoPromiseComposition.groovy
│ ├── DemoSieveEratosthenes.groovy
│ ├── DemoSieveEratosthenesTheGoWay.groovy
│ ├── DemoSieveEratosthenesTheGoWayWithOperators.groovy
│ ├── DemoSieveEratosthenesWithContinuations.groovy
│ ├── DemoSieveEratosthenesWithOperator.groovy
│ ├── DemoSieveEratosthenesWithPipelines.groovy
│ ├── DemoSimpleMashup.groovy
│ ├── DemoStockPricesDataflows.groovy
│ ├── DemoStockPricesWithDataflowOperator.groovy
│ ├── DemoStockPricesWithTask.groovy
│ ├── DemoSwingDataflowOperators.groovy
│ ├── DemoSwingDataflowProgress.groovy
│ ├── DemoSwingFancyDataflow.groovy
│ ├── DemoSwingLifeWithDataflowOperators.groovy
│ ├── DemoTaskReturnValue.groovy
│ ├── DemoWaitForTaskTerminationWithAgent.groovy
│ ├── expression
│ │ ├── DemoExpressions.groovy
│ │ ├── DemoMethodDispatch.groovy
│ │ ├── DemoMethodDispatchWithArguments.groovy
│ │ └── DemoProperties.groovy
│ ├── kanban
│ │ ├── DemoKanbanFlow.groovy
│ │ ├── DemoKanbanFlowBroadcast.groovy
│ │ ├── DemoKanbanFlowCycle.groovy
│ │ ├── DemoKanbanFlowGameOfLife.groovy
│ │ └── DemoKanbanLazyPrimeSequenceLoops.groovy
│ ├── operators
│ │ ├── DemoCallCenter.groovy
│ │ ├── DemoDataflowOperatorWithState.groovy
│ │ ├── DemoFibonacciWithSingleOperator.groovy
│ │ ├── DemoFibonacciWithSingleOperatorCompileStatic.groovy
│ │ ├── DemoOperatorCustomEvent.groovy
│ │ ├── DemoOperatorExceptionHandling.groovy
│ │ ├── DemoOperatorLifecycle.groovy
│ │ ├── DemoOperatorPoisson.groovy
│ │ ├── DemoOperatorResourceManagement.groovy
│ │ ├── DemoOperatorShutdown.groovy
│ │ ├── DemoOperatorStockPriceProcessing.groovy
│ │ ├── DemoPrioritySelectWithOperators.groovy
│ │ ├── DemoProcessingNodeUse.groovy
│ │ ├── DemoWaitingForOperatorPoisson.groovy
│ │ ├── DemoWaitingForOperatorPoissonTheGuruVersion.groovy
│ │ ├── DemoWebPageProcessing.groovy
│ │ ├── DemoWebPageProcessingWithCaching.groovy
│ │ ├── chaining
│ │ │ ├── DemoCombination.groovy
│ │ │ ├── DemoConnectingChannelsWithInto.groovy
│ │ │ ├── DemoConnectingChannelsWithSplit.groovy
│ │ │ ├── DemoEncryptorPipeline.groovy
│ │ │ ├── DemoEncryptorPipelineUsedInComplexNetwork.groovy
│ │ │ ├── DemoOperatorChaining.groovy
│ │ │ ├── DemoOperatorChainingOnBroadcastSubscription.groovy
│ │ │ ├── DemoOperatorChainingOnDFV.groovy
│ │ │ ├── DemoOperatorChainingOnSyncBroadcastSubscription.groovy
│ │ │ ├── DemoOperatorChainingOnSyncDFV.groovy
│ │ │ ├── DemoOperatorChainingOnSynchronousChannels.groovy
│ │ │ ├── DemoOperatorChainingUsingOr.groovy
│ │ │ ├── DemoOperatorChainingWithCustomPGroup.groovy
│ │ │ ├── DemoOperatorSharedChaining.groovy
│ │ │ ├── DemoPipelineBuilder.groovy
│ │ │ ├── DemoPipelineBuilderAdvanced.groovy
│ │ │ └── DemoPipelineBuilderWithChoices.groovy.groovy
│ │ └── shutdown
│ │ │ └── DemoGratefulShutdown.groovy
│ ├── process
│ │ ├── Copy.groovy
│ │ ├── DemoCSPProcesses.groovy
│ │ ├── DemoFibonacci1.groovy
│ │ ├── DemoFibonacci1WithSynchronousChannels.groovy
│ │ ├── DemoFibonacci2.groovy
│ │ ├── DemoFibonacci2WithSynchronousChannels.groovy
│ │ ├── DemoNumbers.groovy
│ │ ├── DemoNumbersWithSynchronousChannels.groovy
│ │ ├── Pairs.groovy
│ │ ├── Plus.groovy
│ │ ├── Prefix.groovy
│ │ ├── Print.groovy
│ │ ├── StatePairs.groovy
│ │ ├── Successor.groovy
│ │ └── Tail.groovy
│ ├── select
│ │ ├── DemoGuardedSelect.groovy
│ │ ├── DemoGuardedSelector.groovy
│ │ ├── DemoPrioritySelect.groovy
│ │ ├── DemoSelect.groovy
│ │ ├── DemoSelectRandomness.groovy
│ │ ├── DemoTheWinnerTakesItAll.groovy
│ │ └── DemoTheWinnerTakesItAllTheLosersStandingSmall.groovy
│ ├── stream
│ │ ├── DemoDataflowStreamAdaptersWithOperators.groovy
│ │ ├── DemoDataflowStreamAdaptersWithSelect.groovy
│ │ └── DemoSieveEratosthenesWithStreams.groovy
│ ├── synchronous
│ │ ├── DemoSelect.groovy
│ │ ├── DemoSlowConsumer.groovy
│ │ ├── DemoSlowConsumerWithOperators.groovy
│ │ ├── DemoSlowConsumers.groovy
│ │ ├── DemoSlowConsumersWithOperators.groovy
│ │ └── DemoSyncDataflowVariable.groovy
│ └── thenChaining
│ │ ├── DemoAsyncDownload.groovy
│ │ ├── DemoChainingActiveObjects.groovy
│ │ ├── DemoChainingActiveObjectsAsFunctions.groovy
│ │ ├── DemoChainingActiveObjectsWithRightShift.groovy
│ │ ├── DemoChainingAndForkingFunctions.groovy.groovy
│ │ ├── DemoChainingClosures.groovy
│ │ ├── DemoChainingFunctions.groovy
│ │ ├── DemoChainingFunctionsBenefits.groovy.groovy
│ │ ├── DemoChainingFunctionsWithRightShift.groovy
│ │ ├── DemoDefaultGroup.groovy
│ │ ├── DemoDownloadUsingFunctionChaining.groovy
│ │ ├── DemoDownloadUsingPromiseChaining.groovy
│ │ ├── DemoDownloadUsingPromiseChainingWithErrorHandling.groovy
│ │ ├── DemoPromiseChainingErrorHandling.groovy
│ │ └── DemoWhenAllBound.groovy
├── forkjoin
│ ├── DemoFJDirect.groovy
│ ├── DemoFib.groovy
│ ├── DemoFibWithCustomWorker.groovy
│ ├── DemoForkJoinFib.groovy
│ ├── DemoForkJoinFileCounter.groovy
│ ├── DemoForkJoinFileCounterPolished.groovy
│ ├── DemoForkJoinMergeSort.groovy
│ ├── DemoQuicksortForkJoin.groovy
│ ├── DemoRawForkJoinFileCounter.groovy
│ ├── DemoSwingMergeSort.groovy
│ └── DemoVisualForkJoinMergeSort.groovy
├── group
│ └── DemoPoolToGroup.groovy
├── remote
│ ├── actor
│ │ ├── calculator
│ │ │ ├── RemoteCalculatorAnswer.groovy
│ │ │ └── RemoteCalculatorQuery.groovy
│ │ ├── chat
│ │ │ ├── ChatClient.groovy
│ │ │ ├── ChatClientActor.groovy
│ │ │ ├── ChatMessage.groovy
│ │ │ ├── ChatServer.groovy
│ │ │ └── ChatServerActor.groovy
│ │ └── pingpong
│ │ │ ├── RemotePing.groovy
│ │ │ └── RemotePong.groovy
│ ├── agent
│ │ ├── ExampleClient.groovy
│ │ └── ExampleServer.groovy
│ └── dataflow
│ │ ├── broadcast
│ │ ├── ExampleBroadcastClient.groovy
│ │ └── ExampleBroadcastServer.groovy
│ │ ├── queue
│ │ ├── ExampleQueueClient.groovy
│ │ └── ExampleQueueServer.groovy
│ │ ├── queuebalancer
│ │ ├── Consumer.groovy
│ │ └── Producer.groovy
│ │ └── variable
│ │ ├── ExampleVariableClient.groovy
│ │ └── ExampleVariableServer.groovy
├── stm
│ ├── DemoCustomBlocks.groovy
│ ├── DemoDirectStm.groovy
│ ├── DemoRetry.groovy
│ └── DemoStm.groovy
└── userguide
│ ├── actor
│ ├── DemoActor_0_1.groovy
│ ├── DemoActor_0_2.groovy
│ ├── DemoActor_0_3.groovy
│ ├── DemoActor_0_4.groovy
│ ├── DemoActor_0_5.groovy
│ ├── DemoActor_0_6.groovy
│ ├── DemoActor_0_7.groovy
│ ├── DemoActor_0_8.groovy
│ ├── DemoActor_0_9.groovy
│ ├── DemoActor_1_1.groovy
│ ├── DemoActor_1_2.groovy
│ ├── DemoActor_1_3.groovy
│ ├── DemoActor_1_4.groovy
│ ├── DemoActor_1_5.groovy
│ ├── DemoActor_2_1.groovy
│ ├── DemoActor_2_2.groovy
│ ├── DemoActor_2_3.groovy
│ ├── DemoActor_2_4.groovy
│ ├── DemoActor_2_5.groovy
│ ├── DemoActor_3_1.groovy
│ ├── DemoActor_3_2.groovy
│ ├── DemoActor_3_3.groovy
│ ├── DemoActor_3_4.groovy
│ ├── DemoActor_3_5.groovy
│ ├── DemoActor_3_6.groovy
│ ├── DemoActor_3_7.groovy
│ ├── DemoActor_4_1.groovy
│ ├── DemoActor_4_2.groovy
│ ├── DemoActor_4_3.groovy
│ ├── DemoActor_4_4.groovy
│ └── DemoActor_4_5.groovy
│ └── geting_started
│ └── DemoStart_2_1.groovy
├── stm
└── TxnExecutorTest.groovy
└── util
├── AbstractMessageQueueTest.groovy
├── DefaultMessageQueueTest.groovy
├── EnhancedRWLockTest.groovy
├── EnhancedSemaphoreTest.groovy
├── FQMessageQueueTest.groovy
└── GParsConfigTest.groovy
/.gitignore:
--------------------------------------------------------------------------------
1 | /bin/
2 | /build/
3 | /out/
4 | /.gradle/
5 | /gradle-app.setting
6 | /cobertura.ser
7 | /buildSrc/.gradle/
8 | /buildSrc/build/
9 | /buildSrc/buildSrc.iml
10 | /*.iws
11 | /GPars.ipr
12 | /GPars.iml
13 | /.classpath
14 | /.project/
15 | /.settings/
16 | *~
17 | /caliper-charts/
18 | /caliper-results/
19 | /.idea/
20 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: groovy
2 |
3 | jdk:
4 | - openjdk8
5 | - oraclejdk8
6 | - openjdk9
7 | - oraclejdk9
8 | - oraclejdk10
9 | - openjdk10
10 | - oraclejdk11
11 | - openjdk11
12 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | GPars (Groovy Parallel Systems) is licences under the Apache Software Licence v2.0. See
2 | http://www.apache.org/licenses/LICENSE-2.0 for the text of the licence.
3 |
--------------------------------------------------------------------------------
/README.idea:
--------------------------------------------------------------------------------
1 | Run "./gradlew idea" to have a fresh IntelliJ IDEA project file generated. Do not use the default GPars_IDEAX project file,
2 | since you are likely to run into problems with unresolved dependencies on third-party libraries,
3 | as the default project file is primarily targeted to be used for code analysis on the Continuous Integration server (TeamCity).
4 |
5 | Find complete developer guidelines at http://gpars.codehaus.org/Developer+Zone
6 |
--------------------------------------------------------------------------------
/artwork/GPars_logo.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GPars/GPars/7cddf7cf2fec1fd66ef800edccfc03315d078a2b/artwork/GPars_logo.zip
--------------------------------------------------------------------------------
/artwork/gpars-logo.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GPars/GPars/7cddf7cf2fec1fd66ef800edccfc03315d078a2b/artwork/gpars-logo.PNG
--------------------------------------------------------------------------------
/artwork/gpars_14x14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GPars/GPars/7cddf7cf2fec1fd66ef800edccfc03315d078a2b/artwork/gpars_14x14.png
--------------------------------------------------------------------------------
/artwork/gpars_192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GPars/GPars/7cddf7cf2fec1fd66ef800edccfc03315d078a2b/artwork/gpars_192x192.png
--------------------------------------------------------------------------------
/artwork/gpars_64x64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GPars/GPars/7cddf7cf2fec1fd66ef800edccfc03315d078a2b/artwork/gpars_64x64.png
--------------------------------------------------------------------------------
/artwork/license.txt:
--------------------------------------------------------------------------------
1 | As per the rules of the logo contest held at the end of 2009, this artwork will be licenced according to the
2 | Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 licence:
3 |
4 | http://creativecommons.org/licenses/by-nc-nd/3.0/
5 |
--------------------------------------------------------------------------------
/bambooBuild:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | # This script is here only for the Codehaus Bamboo build.
4 |
5 | buildTask="build zipSamples zipJavaDemo zipDist zipGuide"
6 |
7 | if [ $# -gt 0 ]
8 | then
9 | buildTask=$1
10 | fi
11 |
12 | export LC_ALL=en_GB.UTF-8
13 |
14 | ./gradlew -i clean $buildTask
15 |
--------------------------------------------------------------------------------
/bambooBuildRelease:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | # This script is here only for the Codehaus Bamboo RELEASE build.
4 |
5 | buildTask="release"
6 |
7 | if [ $# -gt 0 ]
8 | then
9 | buildTask=$1
10 | fi
11 |
12 | export LC_ALL=en_GB.UTF-8
13 |
14 | ./gradlew -i clean $buildTask
15 |
--------------------------------------------------------------------------------
/buildSrc/build.gradle:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008–2014 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | // Author: Václav Pech
18 | // Author: Russel Winder
19 | // Author: Dierk König
20 | // Author: Hans Dockter
21 | // Author: Rene Groeschke
22 |
23 | apply plugin: 'groovy'
24 |
25 | repositories {
26 | mavenCentral()
27 | }
28 |
29 | dependencies {
30 | compile localGroovy()
31 | compile gradleApi()
32 | }
33 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | version = 2.0-SNAPSHOT
2 |
3 | gpars_useMavenLocal = false
4 |
5 | gpars_groovyVersion = 2.5.0
6 | gpars_nettyVersion = 4.1.25.Final
7 | gpars_spockVersion = 1.1-groovy-2.4
8 | gpars_multiverseVersion = 0.7.0
9 | gpars_jcspVersion = 1.1.0
10 | gpars_gsonVersion = 2.8.5
11 | gpars_guavaVersion = 25.1-jre
12 | gpars_wagonhttplightweightVersion = 3.0.0
13 | gpars_coberturaVersion = 2.1.1
14 | gpars_jansiVersion = 1.17.1
15 |
16 | gpars_ascidoctorjPDFVersion = 1.5.0-alpha.16
17 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GPars/GPars/7cddf7cf2fec1fd66ef800edccfc03315d078a2b/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/java-demo/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/java-demo/.project:
--------------------------------------------------------------------------------
1 |
2 | java-demo
3 | NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.
4 |
5 |
6 |
7 | org.eclipse.jdt.core.javabuilder
8 |
9 |
10 |
11 | org.eclipse.jdt.core.javanature
12 |
13 |
--------------------------------------------------------------------------------
/java-demo/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | #Fri Nov 12 23:10:08 CET 2010
2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
3 | eclipse.preferences.version=1
4 | org.eclipse.jdt.core.compiler.source=1.6
5 | org.eclipse.jdt.core.compiler.compliance=1.6
6 |
--------------------------------------------------------------------------------
/java-demo/java-demo.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/java-demo/src/test/java/org/codehaus/gpars/javademo/benchmark/DownloadStatefulDynamicDispatchActor.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-10 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package org.codehaus.gpars.javademo.benchmark;
18 |
19 | final class DownloadStatefulDynamicDispatchActor extends StatefulDynamicDispatchActor {
20 | @Override
21 | String handleMessage(final String message) {
22 | return message.replaceFirst("Requested ", "Downloaded ");
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/java-demo/src/test/java/org/codehaus/gpars/javademo/benchmark/IndexStatefulDynamicDispatchActor.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-10 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package org.codehaus.gpars.javademo.benchmark;
18 |
19 | final class IndexStatefulDynamicDispatchActor extends StatefulDynamicDispatchActor {
20 | @Override
21 | String handleMessage(final String message) {
22 | return message.replaceFirst("Downloaded ", "Indexed ");
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/java-demo/src/test/java/org/codehaus/gpars/javademo/benchmark/WriteStatefulDynamicDispatchActor.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-10 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package org.codehaus.gpars.javademo.benchmark;
18 |
19 | final class WriteStatefulDynamicDispatchActor extends StatefulDynamicDispatchActor {
20 | @Override
21 | String handleMessage(final String message) {
22 | return message.replaceFirst("Indexed ", "Wrote ");
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/caliper-1.0-SNAPSHOT.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GPars/GPars/7cddf7cf2fec1fd66ef800edccfc03315d078a2b/lib/caliper-1.0-SNAPSHOT.jar
--------------------------------------------------------------------------------
/licenses/LICENSE-multiverse.txt:
--------------------------------------------------------------------------------
1 | This software is licensed under the Apache 2 license, quoted below.
2 |
3 | Copyright 2009-2011 Peter Veentjer.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
6 | compliance with the License. You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software distributed under the License is
11 | distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 | express or implied. See the License for the specific language governing permissions and limitations
13 | under the License.
--------------------------------------------------------------------------------
/licenses/LICENSE.slf4j.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2004-2007 QOS.ch
3 | * All rights reserved.
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining
6 | * a copy of this software and associated documentation files (the
7 | * "Software"), to deal in the Software without restriction, including
8 | * without limitation the rights to use, copy, modify, merge, publish,
9 | * distribute, sublicense, and/or sell copies of the Software, and to
10 | * permit persons to whom the Software is furnished to do so, subject to
11 | * the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be
14 | * included in all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 | */
24 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'GPars'
2 |
--------------------------------------------------------------------------------
/src/main/assembly/all.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | all
6 |
7 | tar.gz
8 | zip
9 |
10 |
11 |
12 |
13 | .
14 | target
15 | true
16 |
17 | target/
18 |
19 |
20 |
21 | target
22 |
23 | *.jar
24 | site/**
25 |
26 |
27 |
28 |
29 |
30 |
31 | false
32 | runtime
33 | false
34 | false
35 | target/dependencies
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/activeobject/ActiveMethod.java:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | GPars - Groovy Parallel Systems
4 |
5 | Copyright © 2008-2013 The original author or authors
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | */
19 |
20 | package groovyx.gpars.activeobject;
21 |
22 | import java.lang.annotation.ElementType;
23 | import java.lang.annotation.Retention;
24 | import java.lang.annotation.RetentionPolicy;
25 | import java.lang.annotation.Target;
26 |
27 | @Retention(RetentionPolicy.SOURCE)
28 | @Target({ElementType.METHOD})
29 | public @interface ActiveMethod {
30 | boolean blocking() default true;
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/activeobject/ActorWithExceptionHandler.java:
--------------------------------------------------------------------------------
1 | package groovyx.gpars.activeobject;
2 |
3 | /**
4 | * @author Kirill Vergun (code@o-nix.me)
5 | * @since 1.3
6 | */
7 | public interface ActorWithExceptionHandler {
8 | Object recoverFromException(String methodName, Exception e);
9 | }
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/actor/DDAHelper.groovy:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-11 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.actor
18 |
19 | /**
20 | * Hooks the supplied when handlers to DDAs
21 | *
22 | * @author Vaclav Pech
23 | */
24 | final class DDAHelper {
25 | static final void when(final target, final closure) {
26 | target.metaClass.onMessage closure
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/actor/DefaultActorClosure.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-10 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.actor;
18 |
19 | import groovy.lang.Closure;
20 |
21 | /**
22 | * Represents the DDA closure to invoke appropriate message handlers based on message runtime type
23 | *
24 | * @author Vaclav Pech
25 | */
26 | public final class DefaultActorClosure extends Closure {
27 |
28 | private final DefaultActor myActor;
29 | private static final long serialVersionUID = 3009666814957486672L;
30 |
31 | DefaultActorClosure(final DefaultActor actor) {
32 | super(actor);
33 | this.myActor = actor;
34 | }
35 |
36 | @Override
37 | public Object call(final Object arguments) {
38 | myActor.onMessage(arguments);
39 | return null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/actor/impl/ActorStopException.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-10 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.actor.impl;
18 |
19 | /**
20 | * An exception indicating Actor stopping request.
21 | * Implementing singleton pattern, ActorException holds the unique reference.
22 | *
23 | * @author Alex Tkachman
24 | * Date: Feb 17, 2009
25 | */
26 | public final class ActorStopException extends ActorException {
27 | private static final long serialVersionUID = 6718779462386378739L;
28 |
29 | ActorStopException() {
30 | }
31 | }
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/actor/impl/ActorTerminationException.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-10 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.actor.impl;
18 |
19 | /**
20 | * An exception indicating Actor termination request.
21 | * Implementing singleton pattern, ActorException holds the unique reference.
22 | *
23 | * @author Vaclav Pech
24 | * Date: Feb 17, 2009
25 | */
26 | public final class ActorTerminationException extends ActorException {
27 | private static final long serialVersionUID = -1525695043073635315L;
28 |
29 | ActorTerminationException() {
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/actor/impl/package.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
19 |
20 |
21 | package groovyx.gpars.actor.impl.*
22 |
23 |
24 |
25 | This package holds classes some non-public aspects of actor implementation.
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/actor/package.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
19 |
20 |
21 | package groovyx.gpars.actor.*
22 |
23 |
24 |
25 | This package holds classes forming the public actor API.
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/agent/AgentThreadFactory.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-10 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.agent;
18 |
19 | import java.util.concurrent.ThreadFactory;
20 |
21 | /**
22 | * Creates daemon threads for the default agent thread pools
23 | *
24 | * @author Vaclav Pech
25 | * Date: 13.4.2010
26 | */
27 | final class AgentThreadFactory implements ThreadFactory {
28 | @Override
29 | public Thread newThread(final Runnable r) {
30 | final Thread thread = new Thread(r);
31 | thread.setDaemon(true);
32 | return thread;
33 | }
34 | }
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/agent/remote/RemoteAgentMock.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2014 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.agent.remote;
18 |
19 | /**
20 | * Fake Agent to intercept closure calls.
21 | *
22 | * @author Rafal Slawik
23 | */
24 | public class RemoteAgentMock {
25 | private Object state = null;
26 |
27 | public void updateValue(Object newValue) {
28 | state = newValue;
29 | }
30 |
31 | public Object getState() {
32 | return state;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/csp/GroovyMobileProcess.groovy:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-10 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.csp
18 |
19 | //import org.jcsp.net.mobile.*
20 |
21 | abstract class GroovyMobileProcess {//todo extends MobileProcess implements Serializable{
22 |
23 | abstract connect(x)
24 |
25 | abstract disconnect()
26 |
27 | }
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/csp/MobileAgent.groovy:
--------------------------------------------------------------------------------
1 | // GPars — Groovy Parallel Systems
2 | //
3 | // Copyright © 2008–2010, 2018 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.csp
18 |
19 | import jcsp.lang.CSProcess
20 |
21 | interface MobileAgent extends CSProcess, Serializable {
22 |
23 | abstract connect(List x)
24 |
25 | abstract disconnect()
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/csp/plugAndPlay/GConsoleStringToInteger.groovy:
--------------------------------------------------------------------------------
1 | // GPars — Groovy Parallel Systems
2 | //
3 | // Copyright © 2008–2010, 2018 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.csp.plugAndPlay
18 |
19 | import jcsp.lang.CSProcess
20 | import jcsp.lang.ChannelInput
21 | import jcsp.lang.ChannelOutput
22 |
23 | class GConsoleStringToInteger implements CSProcess {
24 |
25 | ChannelInput inChannel
26 | ChannelOutput outChannel
27 |
28 | def void run() {
29 | while (true) {
30 | def String s = inChannel.read().trim()
31 | def i = Integer.valueOf(s)
32 | outChannel.write(i)
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/csp/plugAndPlay/GFixedDelay.groovy:
--------------------------------------------------------------------------------
1 | // GPars — Groovy Parallel Systems
2 | //
3 | // Copyright © 2008–2010, 2018 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.csp.plugAndPlay
18 |
19 | import jcsp.lang.CSProcess
20 | import jcsp.lang.CSTimer
21 | import jcsp.lang.ChannelInput
22 | import jcsp.lang.ChannelOutput
23 |
24 | class GFixedDelay implements CSProcess {
25 |
26 | ChannelInput inChannel
27 | ChannelOutput outChannel
28 | long delay = 0
29 |
30 | void run() {
31 | def timer = new CSTimer()
32 | while (true) {
33 | def v = inChannel.read()
34 | timer.sleep(delay)
35 | outChannel.write(v)
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/csp/plugAndPlay/GIdentity.groovy:
--------------------------------------------------------------------------------
1 | // GPars — Groovy Parallel Systems
2 | //
3 | // Copyright © 2008–2010, 2018 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.csp.plugAndPlay
18 |
19 | import jcsp.lang.CSProcess
20 | import jcsp.lang.ChannelInput
21 | import jcsp.lang.ChannelOutput
22 |
23 | class GIdentity implements CSProcess {
24 |
25 | ChannelOutput outChannel
26 | ChannelInput inChannel
27 |
28 | void run() {
29 | while (true) {
30 | outChannel.write(inChannel.read())
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/csp/plugAndPlay/GObjectToConsoleString.groovy:
--------------------------------------------------------------------------------
1 | // GPars — Groovy Parallel Systems
2 | //
3 | // Copyright © 2008–2010, 2018 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.csp.plugAndPlay
18 |
19 | import jcsp.lang.CSProcess
20 | import jcsp.lang.ChannelInput
21 | import jcsp.lang.ChannelOutput
22 |
23 | class GObjectToConsoleString implements CSProcess {
24 |
25 | ChannelInput inChannel
26 | ChannelOutput outChannel
27 |
28 | def void run() {
29 | while (true) {
30 | def o = inChannel.read()
31 | outChannel.write(o.toString() + "\n")
32 | }
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/csp/plugAndPlay/GPrefix.groovy:
--------------------------------------------------------------------------------
1 | // GPars — Groovy Parallel Systems
2 | //
3 | // Copyright © 2008–2010, 2018 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.csp.plugAndPlay
18 |
19 | import jcsp.lang.CSProcess
20 | import jcsp.lang.ChannelInput
21 | import jcsp.lang.ChannelOutput
22 |
23 | class GPrefix implements CSProcess {
24 |
25 | int prefixValue = 0
26 | ChannelInput inChannel
27 | ChannelOutput outChannel
28 |
29 | void run() {
30 | outChannel.write(prefixValue)
31 | while (true) {
32 | outChannel.write(inChannel.read())
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/csp/plugAndPlay/GPrint.groovy:
--------------------------------------------------------------------------------
1 | // GPars — Groovy Parallel Systems
2 | //
3 | // Copyright © 2008–2010, 2018 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.csp.plugAndPlay
18 |
19 | import jcsp.lang.CSProcess
20 | import jcsp.lang.CSTimer
21 | import jcsp.lang.ChannelInput
22 |
23 | class GPrint implements CSProcess {
24 |
25 | ChannelInput inChannel
26 | String heading = "No Heading Provided"
27 | long delay = 200
28 |
29 | def void run() {
30 | def timer = new CSTimer()
31 | println "${heading}"
32 | while (true) {
33 | println inChannel.read().toString()
34 | if (delay != 0) {
35 | timer.sleep(delay)
36 | }
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/csp/plugAndPlay/GStatePairs.groovy:
--------------------------------------------------------------------------------
1 | // GPars — Groovy Parallel Systems
2 | //
3 | // Copyright © 2008–2010, 2018 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.csp.plugAndPlay
18 |
19 | import jcsp.lang.CSProcess
20 | import jcsp.lang.ChannelInput
21 | import jcsp.lang.ChannelOutput
22 |
23 | class GStatePairs implements CSProcess {
24 |
25 | ChannelOutput outChannel
26 | ChannelInput inChannel
27 |
28 | void run() {
29 |
30 | def n1 = inChannel.read()
31 | def n2 = inChannel.read()
32 | while (true) {
33 | outChannel.write(n1 + n2)
34 | n1 = n2
35 | n2 = inChannel.read()
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/csp/plugAndPlay/GSuccessor.groovy:
--------------------------------------------------------------------------------
1 | // GPars — Groovy Parallel Systems
2 | //
3 | // Copyright © 2008–2010, 2018 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.csp.plugAndPlay
18 |
19 | import jcsp.lang.CSProcess
20 | import jcsp.lang.ChannelInput
21 | import jcsp.lang.ChannelOutput
22 |
23 | class GSuccessor implements CSProcess {
24 |
25 | ChannelInput inChannel
26 | ChannelOutput outChannel
27 |
28 | void run() {
29 | while (true) {
30 | outChannel.write(inChannel.read() + 1)
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/csp/plugAndPlay/GTail.groovy:
--------------------------------------------------------------------------------
1 | // GPars — Groovy Parallel Systems
2 | //
3 | // Copyright © 2008–2010, 2018 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.csp.plugAndPlay
18 |
19 | import jcsp.lang.CSProcess
20 | import jcsp.lang.ChannelInput
21 | import jcsp.lang.ChannelOutput
22 |
23 | class GTail implements CSProcess {
24 |
25 | ChannelOutput outChannel
26 | ChannelInput inChannel
27 |
28 | void run() {
29 | inChannel.read()
30 | while (true) {
31 | outChannel.write(inChannel.read())
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/csp/util/FairMultiplex.groovy:
--------------------------------------------------------------------------------
1 | // GPars — Groovy Parallel Systems
2 | //
3 | // Copyright © 2008–2010, 2018 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.csp.util
18 |
19 | import groovyx.gpars.csp.ALT
20 | import groovyx.gpars.csp.ChannelInputList
21 |
22 | import jcsp.lang.CSProcess
23 | import jcsp.lang.ChannelOutput
24 |
25 | class FairMultiplex implements CSProcess {
26 |
27 | ChannelInputList inChannels
28 | ChannelOutput outChannel
29 |
30 | def void run() {
31 | def alt = new ALT(inChannels)
32 | while (true) {
33 | def index = alt.fairSelect()
34 | outChannel.write(inChannels[index].read())
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/csp/util/Multiplexer.groovy:
--------------------------------------------------------------------------------
1 | // GPars — Groovy Parallel Systems
2 | //
3 | // Copyright © 2008–2010, 2018 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.csp.util
18 |
19 | import groovyx.gpars.csp.ALT
20 | import groovyx.gpars.csp.ChannelInputList
21 |
22 | import jcsp.lang.CSProcess
23 | import jcsp.lang.ChannelOutput
24 |
25 | class Multiplexer implements CSProcess {
26 |
27 | ChannelInputList inChannels
28 | ChannelOutput outChannel
29 |
30 | void run() {
31 | def alt = new ALT(inChannels)
32 | while (true) {
33 | def index = alt.select()
34 | outChannel.write(inChannels[index].read())
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/csp/util/PriMultiplex.groovy:
--------------------------------------------------------------------------------
1 | // GPars — Groovy Parallel Systems
2 | //
3 | // Copyright © 2008–2010, 2018 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.csp.util
18 |
19 | import groovyx.gpars.csp.ALT
20 | import groovyx.gpars.csp.ChannelInputList
21 |
22 | import jcsp.lang.CSProcess
23 | import jcsp.lang.ChannelOutput
24 |
25 | class PriMultiplex implements CSProcess {
26 |
27 | ChannelInputList inChannels
28 | ChannelOutput outChannel
29 |
30 | def void run() {
31 | def alt = new ALT(inChannels)
32 | while (true) {
33 | def index = alt.priSelect()
34 | outChannel.write(inChannels[index].read())
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/dataflow/DataflowChannel.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-11 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.dataflow;
18 |
19 | /**
20 | * A common interface for all dataflow variables, streams or queues
21 | *
22 | * @author Vaclav Pech
23 | * Date: 21st Sep 2010
24 | */
25 | public interface DataflowChannel extends DataflowReadChannel, DataflowWriteChannel {
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/dataflow/DataflowChannelListener.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-2012 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.dataflow;
18 |
19 | /**
20 | * Gets notified about state changes inside DataflowReadChannels
21 | *
22 | * @author Vaclav Pech
23 | */
24 | public interface DataflowChannelListener {
25 | /**
26 | * Notifies about messages passed through the channel
27 | *
28 | * @param message The value just added to the channel
29 | */
30 | void onMessage(T message);
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/dataflow/SelectableChannel.java:
--------------------------------------------------------------------------------
1 | package groovyx.gpars.dataflow;
2 |
3 | import groovy.lang.Closure;
4 | import groovyx.gpars.actor.impl.MessageStream;
5 | import groovyx.gpars.dataflow.expression.DataflowExpression;
6 |
7 | /**
8 | * Created with IntelliJ IDEA.
9 | * User: Vaclav
10 | * Date: 5.7.13
11 | * Time: 22:17
12 | * To change this template use File | Settings | File Templates.
13 | */
14 | public interface SelectableChannel {
15 | /**
16 | * Send all pieces of data bound in the future to the provided stream when it becomes available. *
17 | *
18 | * @param closure closure to execute when data becomes available. The closure should take at most one argument.
19 | */
20 | void wheneverBound(Closure closure);
21 |
22 | /**
23 | * Send all pieces of data bound in the future to the provided stream when it becomes available.
24 | *
25 | * @param stream stream where to send result
26 | */
27 | void wheneverBound(MessageStream stream);
28 |
29 | /**
30 | * Retrieves the value at the head of the buffer. Returns null, if no value is available.
31 | *
32 | * @return The value bound to the DFV at the head of the stream or null
33 | * @throws InterruptedException If the current thread is interrupted
34 | */
35 | @SuppressWarnings({"ClassReferencesSubclass"}) DataflowExpression poll() throws InterruptedException;
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/dataflow/impl/BindErrorDistributor.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-2012 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.dataflow.impl;
18 |
19 | /**
20 | * Fires requested events
21 | *
22 | * @author Vaclav Pech
23 | */
24 | public interface BindErrorDistributor {
25 | void fireBindError(T oldValue, T failedValue, boolean uniqueBind);
26 |
27 | void fireBindError(T oldValue, Throwable failedError);
28 |
29 | void fireBindError(Throwable oldError, T failedValue, boolean uniqueBind);
30 |
31 | void fireBindError(Throwable oldError, Throwable failedError);
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/dataflow/impl/BindErrorListenerManager.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-2012 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.dataflow.impl;
18 |
19 | import groovyx.gpars.dataflow.BindErrorListener;
20 |
21 | import java.util.Collection;
22 |
23 | /**
24 | * @author Vaclav Pech
25 | */
26 | public interface BindErrorListenerManager {
27 | void addBindErrorListener(BindErrorListener listener);
28 |
29 | void addAllBindErrorListeners(Collection> listeners);
30 |
31 | void removeBindErrorListener(BindErrorListener listener);
32 |
33 | Collection> getBindErrorListeners();
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/dataflow/impl/DataflowChannelEventDistributor.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-2012 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.dataflow.impl;
18 |
19 | /**
20 | * @author Vaclav Pech
21 | */
22 | public interface DataflowChannelEventDistributor {
23 | void fireOnMessage(T message);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/dataflow/impl/DataflowChannelEventListenerManager.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-2012 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.dataflow.impl;
18 |
19 | import groovyx.gpars.dataflow.DataflowChannelListener;
20 |
21 | import java.util.Collection;
22 |
23 | /**
24 | * @author Vaclav Pech
25 | */
26 | public interface DataflowChannelEventListenerManager {
27 | void addDataflowChannelListener(DataflowChannelListener listener);
28 |
29 | void addAllDataflowChannelListeners(Collection> listeners);
30 |
31 | void removeDataflowChannelListener(DataflowChannelListener listener);
32 |
33 | Collection> getListeners();
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/dataflow/operator/ControlMessage.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-2012 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.dataflow.operator;
18 |
19 | /**
20 | * A marker interface indicating control dataflow messages, which in general do not get propagated to the operator's body
21 | *
22 | * @author Vaclav Pech
23 | */
24 | @SuppressWarnings("MarkerInterface")
25 | public interface ControlMessage {
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/dataflow/operator/StopGently.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-11 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.dataflow.operator;
18 |
19 | /**
20 | * A message to stop operators' actors once they handle the next round of messages.
21 | *
22 | * @author Vaclav Pech
23 | */
24 | @SuppressWarnings({"ALL"})
25 | class StopGently {
26 | private static StopGently ourInstance = new StopGently();
27 |
28 | public static StopGently getInstance() {
29 | return ourInstance;
30 | }
31 |
32 | private StopGently() {
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/dataflow/operator/package.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
19 |
20 |
21 | package groovyx.gpars.dataflow.operator.*
22 |
23 |
24 |
25 | This package holds classes representing operators and channels necessary for full dataflow concurrency.
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/dataflow/package.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
19 |
20 |
21 | package groovyx.gpars.dataflow.*
22 |
23 |
24 |
25 | This package holds classes for basic dataflow concurrency constructs, like dataflow variables, streams and threads.
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/main/groovy/groovyx/gpars/dataflow/stream/FList.java:
--------------------------------------------------------------------------------
1 | // GPars - Groovy Parallel Systems
2 | //
3 | // Copyright © 2008-10 The original author or authors
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | package groovyx.gpars.dataflow.stream;
18 |
19 | import groovy.lang.Closure;
20 |
21 | /**
22 | * Represents a list implemented as a Functional Queue.
23 | *
24 | * @param The type of values to store in the list
25 | */
26 | public interface FList extends Iterable {
27 |
28 | T getFirst();
29 |
30 | FList getRest();
31 |
32 | boolean isEmpty();
33 |
34 | FList filter(Closure filterClosure);
35 |
36 | FList