Uploaded image for project: 'Commons Sandbox'
  1. Commons Sandbox
  2. SANDBOX-271

Synchronization and serialization changes from Kris

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Pipeline
    • Labels:
      None

      Description

      Kris Nuttycomb sent me some changes a while ago to enhance synchronization and add serialVersionUID keys to some events and exceptions. These changes haven't made it into the code base, so here they are for review (a patch file will be attached). The first and last changes listed below were originated by me.

      Here is a summary of the changes:
      change pom.xml

      • change junit version from 3.8.1 to 4.5, this is a change I made, since the Netbeans IDE can generate test code for this version. Some annotations were added because of this.

      change src/test/java/org/apache/commons/pipeline/PipelineTest.java

      • replace Thread.yield() with synchronized(counter)

      add a serialVersionUID to

      • src/main/java/org/apache/commons/pipeline/event/ObjectProcessedEvent.java
      • src/main/java/org/apache/commons/pipeline/event/PipelineShutdownRequest.java
      • src/main/java/org/apache/commons/pipeline/event/KeyAvailableEvent.java
      • src/main/java/org/apache/commons/pipeline/PipelineCreationException.java
      • src/main/java/org/apache/commons/pipeline/validation/ValidationException.java
      • src/main/java/org/apache/commons/pipeline/StageException.java

      change src/main/java/org/apache/commons/pipeline/listener/ObjectProcessedEventCounter.java

      • make the getCounts() method synchronized

      change src/main/java/org/apache/commons/pipeline/testFramework/TestStage.java

      • change the processedObjects list into a Collections.synchronizedList(new ArrayList<Object>())

      change src/main/java/org/apache/commons/pipeline/testFramework/TestStageContext.java

      • change the listeners list into a Collections.synchronizedList( new ArrayList<StageEventListener>() )
      • notify listeners when an event is raised

      change src/main/java/org/apache/commons/pipeline/config/PipelineRuleSet.java

      • Some minor javadoc formatting improvements
      • Noted that <feed> configuration information must follow the first stage, otherwise it will have no effect

        Attachments

        1. kn_sync.patch
          20 kB
          Ken Tanaka

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kentanaka Ken Tanaka
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified